> You can't create a trigger on a select. Only insert, delete, and  
> update statements can fire a trigger.

True. Though now that you mention it, it would obviously be useful to  
be able to trigger from a select.

>> CREATE TRIGGER log_foo
>>  INSTEAD OF SELECT ON view_bar
>>  INSERT INTO log_foo (<my application's select statement>);
>>

> Even if you could do this, you would have to replace the table the  
> application is reading with a view so you could use the trigger.  
> Then you would be susceptible to breaking the application if it  
> write back to the table.

Well, we'd really use a "before" or "after" here, rather than "instead  
of", so it could work on a table.

Tom
BareFeet
http://www.tandb.com.au/sqlite/compare/

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

Reply via email to