Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default value: Today's date 1

Status
Not open for further replies.

tseh

Programmer
Jan 13, 2000
64
CA
How can I alter a table with a column called

Date_Entered

with the default of the date entered?
 
ALTER TABLE TableName WITH NOCHECK
ADD CONSTRAINT [DF_Date_Entered] DEFAULT getdate() FOR [Date_Entered]
GO

JB
 
You can go to the design table on the enterprise manager and have a default value set to getdate() for the field
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top