sql - sqlite changing a value using joins -


i have table called:

recipes name  |  key abc   |  2 

and second table called:

monday cell_id  |  recipe_id  |  recipe_name 4        |             |  abc 

how set recipe_id column in monday key value other table name , recipe name in both tables same? i'm using sqlite.

you can use correlated subquery key value corresponding name:

update monday set recipe_id = (select key                  recipes                  name = monday.recipe_name) 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -