आप उपयोग कर सकते हैं not exists
:
delete from user
where not exists (select * from message m where m.userid = user.id)
and not exists (select * from archivedMessage am where am.userid = user.id)
आप उपयोग कर सकते हैं not exists
:
delete from user
where not exists (select * from message m where m.userid = user.id)
and not exists (select * from archivedMessage am where am.userid = user.id)