I need to create a trigger that BEFORE a row is deleted from a table, the sql used to create that row (or a way to recreate it) should be saved to another backup table.
For example:

CREATE TRIGGER trigger_delete Before DELETE ON table1
BEGIN
INSERT INTO backup_table(oldid, sql, tablename, operation) VALUES (old.rowid, "sql", "table1", 1);
END

The missing field is "sql" ... do you have a smart idea to solve my problem?
Thanks.
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/




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

Reply via email to