Getdate Function
Why Getdate Function is used in SQL.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Oct 14, 2011, 12:30 AM
Select getDate() as SystemDateTime;
For more Information : Refer this Blog
TulasiPosted Oct 14, 2011, 12:25 AM
GETDATE function is used to retrieve the current database system time in SQL Server. Its syntax is
GETDATE()
GETDATE does not require any argument.
Example: The SQL statement
SELECT GETDATE();
yields the following result:
'2000-03-15 00:05:02.123'
GETDATE function is most useful when we need to record the time a particular transaction happens. In SQL Server, we simply insert the value of the GETDATE() function into the table to achieve this. We can also set the default value of a column to be GETDATE() to achieve the same purpose.
Please do not forget to mark "Accpeted Answer".