Options to Delete with Two Tables
Posted: November 30, 2014 Filed under: Uncategorized Leave a comment--option 1 delete from jobs where exists (select 1 from calibrations c where id =c.JobId) --option 2 delete from jobs from calibrations c inner join jobs j on j.id =c.JobId --option 3 delete from jobs where id in (select Jobid from calibrations ) --This is not a good option if you use the id column from your delete table, all rows will be deleted delete from jobs where id in (select Id from calibrations )
Advertisements