join - How do I make an UPDATE while joining tables on SQLite? -


i tried :

update closure join item on ( item_id = id )  set checked = 0  ancestor_id = 1 

and:

update closure, item  set checked = 0  ancestor_id = 1 , item_id = id 

both works mysql, give me syntax error in sqlite.

how can make update / join works sqlite version 3.5.9 ?

you can't. sqlite doesn't support joins in update statements.

but, can subquery instead:

update closure set checked = 0  item_id in (select id item ancestor_id = 1); 

or that; it's not clear schema is.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -