db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: using SELECT as an SQL triggered action
Date Fri, 08 Feb 2008 18:40:33 GMT
> my problem is how to store the result of the SELECT * from table_name
> statement so that i can display it on the console output whenever ant data
> is inserted into the table,that data is retrieved from the table.

It sounds like you're trying to build a sort of "audit trail", so that
you can keep track of changes to your data.

Triggers are indeed useful for this sort of thing.

I think one way to do this is to have your trigger capture the data
that is being inserted/updated/deleted, and inside your trigger take
that data and store it in an "audit" table.

Then, whenever you want, you can issue normal select statements against
your audit table, and fetch the audit records of interest.



View raw message