Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit a read-only view

Tags:

sqlite

I have a column and I would like to edit some of its rows. The problem is that the table is a view so I cannot edit the rows. How would I proceed to solve this problem?

like image 426
Adam Avatar asked Dec 17 '10 04:12

Adam


Video Answer


1 Answers

SQLite doesn't let you update views. But it does allow triggers on views. So you can write an INSTEAD OF UPDATE trigger that makes the appropriate modifications to the underlying table.

like image 149
dan04 Avatar answered Nov 11 '22 13:11

dan04