sql - Getting DATETIME for rows inserted/Modified -


Using SQL Server 2005, I need to get the date time of all the rows in a particular table to be created Unfortunately, there are no "linewashing" or datetime columns in the table (I know this is a major design flaw).

So, I was wondering if SQL Server keeps the date time for inserting each line.

Recommendations for comments are appreciated

with lamps

< P> No, the SQL Server does not timestamp the rows automatically when they are created as you have suggested, for the future, you can create a new date_created column and make it the default GETDATE () :

  Optional table your_table ADD contract dc_your_table_date_created debit gate (date_created;  

If you want, you can also use a trigger instead.


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -