On Thu, Jul 31, 2014 at 2:42 PM, Christian Höhne <bombu...@gmail.com> wrote:
> The CREATE TRIGGER example shown in the INSTEAD OF page ( > http://www.sqlite.org/lang_createtrigger.html#instead_of_trigger) is > misleading because it does not show the correct use of the INSTEAD OF > clause in the trigger statement, it actually misses this clause altogether: > The "Examples" section is suppose to cover the entire document, not just the INSTEAD OF trigger. Though I admit that is not exactly clear. I will reword it. > > Examples > > Assuming that customer records are stored in the "customers" table, and > that order records are stored in the "orders" table, the following trigger > ensures that all associated orders are redirected when a customer changes > his or her address: > > CREATE TRIGGER update_customer_address UPDATE OF address ON customers > BEGIN > UPDATE orders SET address = new.address WHERE customer_name = old.name > ; > END; > > It should read: > > CREATE TRIGGER update_customer_address *INSTEAD OF* UPDATE OF address > ON customers > > -- > Christian Hoehne > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users