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.
我正在尝试在数据库中列出所有拥有一本书的出版商。
询问:
SELECT Publisher FROM book GROUP BY Publisher HAVING COUNT(book) = 1;
我的猜测是问题在这里......
HAVING COUNT(book) = 1
该表名为book。除非该表还包含一个名为 的字段book,否则 Access 将被混淆。
book
如果您想查看Publisher哪些只有一行,请使用此...
Publisher
SELECT Publisher FROM book GROUP BY Publisher HAVING COUNT(*) = 1;