At 02:21 06/08/2007 +0200, you wrote:
I'm sorry to bother you again, but I can't figure out how to write a
trigger that will set a column to 1 when a user creates a new record :-/
Found it in "Sam's Sqlite (2004)":
CREATE TRIGGER insert_mytable_timestamp AFTER INSERT ON mytable
BEGIN
UPDATE mytable SET timestamp = 1 WHERE rowid=new.rowid;
END;
I think it'd be a good thing to add examples in the page:
http://sqlite.org/lang_createtrigger.html
G.
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------