"Noah Hart" <[EMAIL PROTECTED]> wrote:
> The documentation for Triggers defines a trigger step as follows:
> 
> trigger-step ::=      update-statement | insert-statement |
> delete-statement | select-statement
> 
> What would be an example of the select-statement?
> 

SELECT statements are useful for the side-effects of functions
that the SELECT statement might call.  For example:

  CREATE TRIGGER r1 AFTER UPDATE ON t1 BEGIN
    SELECT raise(ABORT, 'x is too large') WHERE x>5;
  END;

You might also have application-defined functions that cause
side effects that you want to issue:

  CREATE TRIGGER r2 AFTER INSERT ON t1 BEGIN
    SELECT notify_other_process(new.x);
  END;

--
D. Richard Hipp <[EMAIL PROTECTED]>

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to