I don't use this for all tables, only the ones with important
information in them, like people, accounts, etc. I actually have two fields, tsCreated and tsUpdated, both which default
to now(). When I do an update, I set the value of tsUpdated to now(). The
tsCreated field is always left alone. This way, I always know when the record
was created and last updated. This is much simpler than using triggers to update a separate audit
table. Wiebe From: Scott Marlowe
[mailto:[EMAIL PROTECTED] Reply at bottom... |
Title: Re: [GENERAL] Determining when a row was inserted
- Re: [GENERAL] Determining when a row was inserted Scott Marlowe
- Re: [GENERAL] Determining when a row was inser... Tom Lane
- Re: [GENERAL] Determining when a row was inser... Martijn van Oosterhout
- Re: [GENERAL] Determining when a row was i... Alex Turner
- Re: [GENERAL] Determining when a row w... Patrick TJ McPhee
- Re: [GENERAL] Determining when a row was inser... Wiebe de Jong
- Re: [GENERAL] Determining when a row was i... Scott Marlowe
- Re: [GENERAL] Determining when a row was i... Alex Turner