Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default for datetime column
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01503623
Message ID:
01503625
Views:
35
>>Hi,
>>
>>Is it possible to specify default for DateTime column of SQL database? Ideally I would like the default to be the current date and time. Please let me know. TIA.
>
>you can supply a constraint that sets the default to GETDATE()
>
>You can do this in SSMS easily if you open the table in design mode and click on the column - there is a section for default.
>
>Update - here's an example -- http://www.mssqltips.com/tip.asp?tip=1425

Thank you very much!
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform