Subject | Re: [firebird-support] Re: Last update date/time |
---|---|
Author | Urs Liska |
Post date | 2005-03-03T17:48:57Z |
Didier Gasser-Morlay schrieb:
DELETE trigger.
Depending on what interests you, you can have different approaches.
You could add a field to your table and put the date/time of any
operation in it. So you have a detailed log of what was changed when.
You can then look for something like SELECT MAX(field_name)...
Or you could create one helper table with two fields (+ an autoinc PK):
TABLE_NAME and DATE_MODIFIED.
In the trigger you update the corresponding record of this field. Of
course you can make it more precise with separate fields for insert,
update and delete.
HTH
Urs
>Meanwhile you can do it yourself with an AFTER INSERT OR UPDATE OR
> Thank you Martijn,
>
> Hopefully a future version could keep track of this.
>
> Didier
DELETE trigger.
Depending on what interests you, you can have different approaches.
You could add a field to your table and put the date/time of any
operation in it. So you have a detailed log of what was changed when.
You can then look for something like SELECT MAX(field_name)...
Or you could create one helper table with two fields (+ an autoinc PK):
TABLE_NAME and DATE_MODIFIED.
In the trigger you update the corresponding record of this field. Of
course you can make it more precise with separate fields for insert,
update and delete.
HTH
Urs