Vladimir Stokic wrote:
Hi there,
Is there any way to identify the change that occurred on a table from within
a trigger defined on that table?
The solution that I can think of is to create an SQL statement by using
new.Column1 or old.Column1, but I was wondering if it can be done faster, by
using, say, a user defined function. Can such information be somehow extracted from sqlite3* structure pointer,
that would be passed on as a user_defined_data to the mentioned user defined
function?

Vladimir Stokic
Vladimir,

You can use an "on update of column_list" trigger that will execute only when a particular column or columns are updated. You can have as many of these triggers as you need defined for different columns on the table. Within the trigger you have access to both the old and new value of the column. See http://www.sqlite.org/lang_createtrigger.html for more detail.

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to