Blackbird Crow Raven
2006-07-13 23:43:50 UTC
I want a timestamp column ("Created") to be the current time.
In Firebird, I did that with a "Before Insert" trigger, but SQL Server only
seems to have an "Instead Of" (bizarre/prapodivne!) and AfterInsert trigger.
If one of these is the way to go, what is the syntax? I tried: "SET CREATED
= GetDate()" but that didn't compile.
Alternately, should I give the column a default value? If so, does anybody
know how to do this in EMS SQL Manager Lite (give a timestamp value a
default value of "Now")?
In Firebird, I did that with a "Before Insert" trigger, but SQL Server only
seems to have an "Instead Of" (bizarre/prapodivne!) and AfterInsert trigger.
If one of these is the way to go, what is the syntax? I tried: "SET CREATED
= GetDate()" but that didn't compile.
Alternately, should I give the column a default value? If so, does anybody
know how to do this in EMS SQL Manager Lite (give a timestamp value a
default value of "Now")?
--
Be the first one on your block to read the uproariously hilarious novel "the
Zany Time Travels of Warble McGorkle" (Book 2 in a trilogy). Download it
here: http://codecentral.borland.com/item.aspx?id=24002
Be the first one on your block to read the uproariously hilarious novel "the
Zany Time Travels of Warble McGorkle" (Book 2 in a trilogy). Download it
here: http://codecentral.borland.com/item.aspx?id=24002