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.
我有一个表 A,其中有一个表 B 的外键字段。我想获取(首选标准 API,HQL 也可以)具有唯一 B 引用的A 的X 条目,
任何想法?
FROM A AS a WHERE a.b IN (SELECT ax.b FROM A AS ax GROUP BY b HAVING COUNT(b) = 1)