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

How to Know when a record was inserted in a table

Status
Not open for further replies.

isonlyme

Programmer
Apr 20, 2002
171
PR
Hey Guys!!!

Need a little help here,

How do I Know when a record was inserted in a table,if i dont have a date stamp column on the table?

By the way I can't add one....

As Always Thanks In advance!!!
 
You will not be able to tell unless you have a timestamp field or a trigger that writes to another "history" table. It may also be in the TLog if you really need to verify the insertion date but you will need a 3rd party tool to read the TLog, a tool like Log Explorer by Lumigent

Thanks

J. Kusch
 
You can use either @@Identity or @@Rowcount and append GetDate() to a Select statement after your Insert has completed. Look at BOL for more info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top