Need list of Default Value or Binding for SmallDateTime

Rx_

Nothing In Moderation
Local time
Yesterday, 22:14
Joined
Oct 22, 2009
Messages
2,803
Looking for a list of exmples for SQL 2010 values to enter into Datatype: smalldatetime Default Value or Binding field

It appears that getdate() will bring in the date time when the record is created.
And that timestamp will update the date every time the record is changed.

Looking for a list of examples to put into the Default Value or Binding.
 
Code:
CREATE TABLE customer
(First_Name char(50),
Last_Name char(50),
Birth_Date datetime default GETDATE())

Or

Code:
ALTER TABLE Customer
ADD CONSTRAINT [DF_CreateDate] 
DEFAULT GETDATE()
FOR Birth_Date

 
Thanks,
Found this list on MSDN under Date and Time Data Types and Functions (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms186724.aspx
It includes the End of Month, date-time offset, and the others to replace the MS Access types with.
 

Users who are viewing this thread

Back
Top Bottom