November 25th, 2008

CURRENT_DATE (today’s date)

Posted by admin in G. ANSI Scalar Functions

Use CURRENT_DATE to get the current date from the system clock of the computer where the DBMS is running.
Example:

     SELECT CURRENT_DATE AS 'Date';

Result:

                   

> DB2, MySQL, Oracle, PostgreSQL, SQL Server, and Sybase support CURRENT_DATE.

> Access doesn’t support CURRENT_DATE. Instead it uses DATE().

> MySQL also uses SYSDATE.

> Oracle also uses SELECT SYSDATE FROM DUAL;.

> SQL Server also uses GETDATE().

Comments are closed.

Sorry, the comment form is closed at this time.