取當前日期各种數据庫的寫法

类别:数据库 点击:0 评论:0 推荐:

取當前日期各种數据庫的寫法

作者﹕CCBZZP


1. ORACLE
SELECT SYSDATE FROM DUAL
2. DB2
SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1
3. INFORMIX
SELECT TODAY FROM TABLE
4. SQLSERVER
SELECT GETDATE() FROM TABLE
5. SQLSERVER
SELECT GETDATE() FROM TABLE
6. MYSQL
mysql> select now();
mysql> select sysdate();
mysql> select curdate();
mysql> select current_date;
mysql> select curtime();
mysql> select current_time;
7. FOXPRO
select DATE() from TABLE


本文地址:http://com.8s8s.com/it/it21198.htm