November 27th, 2008

CURRENT_TIMESTAMP (date and time)

Posted by admin in G. ANSI Scalar Functions

Use CURRENT_TIMESTAMP to get the current date and time from the system clock of the computer where the DBMS is running.

Example:

     SELECT CURRENT_TIMESTAMP AS 'Timestamp';

Result:

                   

> DB2, MySQL, PostgreSQL, SQL Server, and Sybase support CURRENT_TIMESTAMP.

> Access doesn’t support CURRENT_TIME. Instead it uses NOW().

> MySQL also uses NOW().

> Oracle doesn’t support CURRENT_TIME, but it does support CURRENT_TIMESTAMP and SYSDATE.

Comments are closed.

Sorry, the comment form is closed at this time.