Jim Terman <jter...@tivo.com> wrote: > It looks like to me that CREATE TRIGGER IF NOT EXISTS is recognized by > sqlite, but I get the following from the command line: > > sqlite> CREATE TABLE foo (id INTEGER PRIMARY KEY, value TEXT, > timestamp DATE);sqlite> CREATE TRIGGER IF NOT EXISTS foo_log AFTER > INSERT ON foo BEGIN INSERT INTO foo (timestamp) VALUES > (DATETIME('NOW')); END; > SQL error: near "NOT": syntax error > sqlite> CREATE TRIGGER foo_log AFTER INSERT ON foo BEGIN INSERT INTO > foo (timestamp) VALUES (DATETIME('NOW')); END; > sqlite>
My guess is, you are running an older version of SQLite that doesn't yet support this syntax. What does this statement report: select sqlite_version(); -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users