Update table with values selected in a subquery


/ Published in: SQL
Save to your folder(s)

The inner join could be nested too


Copy this code and paste it in your HTML
  1. UPDATE revisions AS target
  2. INNER JOIN (SELECT revision_id AS rev_id, id AS f_id FROM tmp2) AS SOURCE
  3. ON target.id = SOURCE.rev_id
  4. SET target.file_de_id = SOURCE.f_id;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.