How to get current date in sql

To get current date uses sql server date function and GETDATE() function.

Syntax

GETDATE();

GETUTCDATE ( )

SYSDATETIME ( )

SYSUTCDATETIME ( )

CURRENT_TIMESTAMP

SYSDATETIMEOFFSET ( )


Examples

SELECT GETDATE();

SELECT GETUTCDATE();

SELECT SYSDATETIME();

SELECT SYSUTCDATETIME();

SELECT CURRENT_TIMESTAMP ;

SELECT SYSDATETIMEOFFSET();