This query gives an error whenever there are more than 1 record that exists in tbl1 and not in tbl1_temp
How can I fix this so that for every record that does not exist in tbl1_temp, update the corresponding record’s status in tbl1
UPDATE tbl1 SET Status = 'Finished'
WHERE id = (SELECT id
FROM tbl1
WHERE NOT EXISTS (SELECT id FROM tbl1_temp
WHERE tbl1.id = tbl1_temp.id))
1 Answer