Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default for datetime column
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01503623
Message ID:
01503625
Vues:
34
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform