|
Whats the difference between getDate() & CURRENT_TIMESTAMP? I'm inserting records into an archival table and need to stamp each row with the current time. I have a column called "ArchiveDate" and I hard-code 'CURRENT_TIMESTAMP' in my INSERT statement. Is there a difference if I use getDate() ?
(comments are locked)
|
|
CURRENT_TIMESTAMP is the ANSI standard method for getting date & time while GETDATE() is the T-SQL method. Also GETDATE() returns the datetime specific to the database including the database time zone offset where as CURRENT_TIMESTAMP doesn't include the database offset.
(comments are locked)
|
|
Great answer, Grant. This is an interesting link if you're looking at CURRENT_TIMESTAMP and GetDate()... http://sqlblog.com/blogs/denis_gobo/archive/2009/02/22/12089.aspx
(comments are locked)
|

