I am trying to fire below query…
Is there any problem in it?
delete from user_role
WHERE user_id in (
select u.user_id from user u, user_role ur
where u.USER_ID=ur.USER_ID and ur.ROLE_ID=4 and u.USER_ID not in (
select user_id from referrers));
As stated in the manual section on
DELETESyntax:You can instead use the multiple-table form of
DELETEand join together your tables: