Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 postgreSQL 数据库中有一个以多对一关系绑定的“guests”表和“invitations”表。我删除了一些客人,现在我想删除没有客人的邀请。我尝试使用“COUNT”,但 WHERE 子句中不允许使用聚合。
检查这个:
delete from invitations where invitationid not in (select invitationid from guests)