给定带有列的表
| user_id | owner_id | something |
我需要删除所有记录,其中user_id OR owner_id存在于另一个表中
像:
delete from permission
where
user-id in (select user_id from users where a = 2)
or
owner_id in (select user_id from users where a = 2)
如果不调用两次相同的查询,我应该如何做到这一点?