|
|
Question : Is getdate() the same as CURRENT_TIMESTAMP in a query?
|
|
There are not real queries: ItemDate is a datetime column
SELECT * FROM Items WHERE ItemDate > CURRENT_TIMESTAMP SELECT * FROM Items WHERE ItemDate > getdate()
Also, if you have a DateTime field, can you set it's default to be CURRENT_TIMESTAMP? Or should you use getdate() as it's default value?
I am understand the difference between the datetime column type and the timestamp column type, but I was wondering about the CURRENT_TIMESTAMP variable and if you can use it the same as getdate() in calculations etc.
|
Answer : Is getdate() the same as CURRENT_TIMESTAMP in a query?
|
|
current_timestamp
is more common syntax across all types of Database system... and a timestamp is again usually recognised as a datetime in other systems...
microsodt like to use things like now() , getdate()
|
|
|
|