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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default value besides 0? 2

Status
Not open for further replies.

LikeThisName

Vendor
May 16, 2002
288
US
have a date field in sql server
want to set the default to today.
i can get today with vbscript when constructing an insert statement but i thought i should use the backend if possible to calculate today's date.

LikeThisName <- ? Sorry It's Taken =)
 
Try
ALTER TABLE MyTable WITH NOCHECK ADD
CONSTRAINT DateColumnDflt DEFAULT (getdate()) FOR DateColumn

or add (getdate()) in the Default value property for the field in EM table designer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top