Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL Server
Expertise: Beginner
May 5, 2000

Setting Default Values

Question:
How do I set a default for a date field having sysdate, current_date or date as the value?

Answer:
To use the current date as a default value in a date field, specify the function GETDATE() as the default. This will enter the current date and time if none is specified when a record is inserted.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date