Mike Levan
SSChampion
Points: 14201
More actions
September 2, 2005 at 6:54 am
#88948
Hi Guys...
How can I auto-generate date and time when a single row is inserted in a table. Do I need a column with datatime data type?
Ninja's_RGR'us
SSC Guru
Points: 294069
September 2, 2005 at 7:03 am
#587163
ALTER TABLE dbo.TableName
ADD ColName datetime not null default (GetDate())
September 2, 2005 at 7:27 am
#587182
Thanks dude.
September 2, 2005 at 7:28 am
#587184
HTH.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply