Thanks.  I'm afraid that when I try your suggestion, it doesn't work:

        create table person (id integer primary key autoincrement,
first_name varchar(30), last_name varchar(30), age integer);
        create trigger adult after insert on person when exists (select
* from person where age < 18) begin select raise(rollback); end;

        output:

        Error: near ")": syntax error

Best,
David

> -----Original Message-----
> From: [email protected] [mailto:sqlite-users-
> [email protected]] On Behalf Of Igor Tandetnik
> Sent: Tuesday, September 28, 2010 3:48 PM
> To: [email protected]
> Subject: Re: [sqlite] how to use raise() in a trigger?
> 
> David Ventimiglia <[email protected]> wrote:
> > Sorry, but I couldn't quite parse how to use the raise-function in a
> > SQLite3 trigger, from the documentation at
> > http://www.sqlite.org/lang_createtrigger.html.  How exactly do I do
> > this?
> 
> select raise(ROLLBACK);
> 
> --
> Igor Tandetnik
> 
> 
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to