取當前日期各种數据庫的寫法
取當前日期各种數据庫的寫法 取當前日期各种數据庫的寫法
作者﹕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