Simon Chen <simonche...@gmail.com> wrote:
> I just realized that I need to something a bit more complicated.
> Basically, I need myfunction() to take parameters. The parameters
> should be generated based on the entry inserted, like something below:
>
> create trigger triggerName before insert on tableName1
>  when not myfunction(tableName1.name, tableName2.name (where
> tableName2.id == tableName1.parent))
> begin
>  select RAISE(ROLLBACK, 'error message');
> end;

when not myfunction(new.name, (select name from tableName2 where 
id=new.parent))

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to