6 ms·
You can use a trigger with INSTEAD OF to update a view: CREATE TRIGGER update_customer_emails_trigger INSTEAD OF UPDATE ON customer_emails BEGIN UPDATE cus
by bbkane 27d ago
You can use a trigger with INSTEAD OF to update a view:
CREATE TRIGGER update_customer_emails_trigger
INSTEAD OF UPDATE ON customer_emails
BEGIN
UPDATE customers
SET email = new.email, name = new.name
WHERE id = old.id;
END;
Maybe that's not as flexible as you need.
SQLites process for table updates can be pretty onerous if their ALTER TABLE lacks support. Its a 12 step process the docs have the temerity to call "simple" instead of "tedious and risky" - https://www.sqlite.org/lang_altertable.html#otheralter https://www.sqlite.org/lang_altertable.html#otheralter
- groundzeros2015 26d agoYes, friction like this. It’s just not a fully featured SQL implementation. As their saying goes, it competes with fopen not oracle.