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:
01503624
Views:
59
This message has been marked as the solution to the initial question of the thread.
>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
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform