为什么我得到“输入参数值”?

时间:2013-10-24 16:35:56

标签: sql ms-access

我正在尝试列出所有发布商在数据库上有一本书。

查询:

SELECT Publisher
FROM book
GROUP BY Publisher
HAVING COUNT(book) = 1;

1 个答案:

答案 0 :(得分:2)

我的猜测是问题在这里......

HAVING COUNT(book) = 1

该表名为book。除非该表还包含名为book的字段,否则Access将会混淆。

如果您想查看只有一行的Publisher,请使用此...

SELECT Publisher
FROM book
GROUP BY Publisher
HAVING COUNT(*) = 1;