![]() ![]() ![]() |
Ispirer SQLWays Database Migration Software
GETDATE
Syntax
GETDATE()
The GETDATE function returns the current system date and time.
Example
This example selects the current system date and time.
This example creates the Employees table and uses GETDATE for a default value for the employee hire date.
CREATE TABLE Employees ( id INT NOT NULL, name VARCHAR(100) NOT NULL, hire_date DATETIME DEFAULT GETDATE() )Equivalents in other databases
TABLE 91. Equivalents in other databases IBM DB2 CURRENT TIMESTAMP special register Oracle SYSDATE function
![]() ![]() ![]() |