Can any one change this query to delete
select a.courseid from branch b
left outer join course a on a.courseid = b.开发者_运维技巧courseid
where a.courseid is NULL
i want to delete that rows which is given by this query
It looks like you want to delete branch records that do not have a courseid in the course table. If that's right, then:
delete b
from branch b
left outer join course a
on a.courseid = b.courseid
where a.courseid is NULL
DELETE a
FROM branch b
left outer join course a
on a.courseid = b.courseid
where a.courseid is NULL
Is this what You want?
精彩评论