Awesome!  Of course, the error message is not optional for rollback,
abort, or fail.  Sweet, thanks!  I suspected it was something obvious.

Best,
David

> -----Original Message-----
> From: [email protected] [mailto:sqlite-users-
> [email protected]] On Behalf Of Igor Tandetnik
> Sent: Tuesday, September 28, 2010 4:11 PM
> To: [email protected]
> Subject: Re: [sqlite] how to use raise() in a trigger?
> 
> David Ventimiglia <[email protected]> wrote:
> > 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;
> 
> Make it
> 
> select raise(rollback, 'some error message');
> 
> --
> 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