Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-21 : 09:08:33
|
| I need a row creation date.Is it better to simply INSERT NOW(), ....or is there a DEFAULT TIMESTAMP / NOW() value that can be designed into the table?SamC |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-08-21 : 09:15:30
|
| I think it is better to have a field and as you say something like INSERT NOW()The timestamp datatype does not actually hold creation date information as far as i know.Paul |
 |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-08-21 : 10:04:21
|
you can define a default on the column ALTER TABLE ProductsADD cre_date datetime NOT NULL DEFAULT getdate() WITH VALUES In TSQL the GETADTE() function is used for the current date and timeHTHJasper Smith |
 |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-08-22 : 09:54:28
|
| Jasper,Thanks - this was a help.It's a nice way to add a create row date to a table without modifying the ASP code that drives it.SamC |
 |
|
|
|
|
|