简体   繁体   English

ms Access中查询中的语法错误(缺少运算符)

[英]syntax error(missing operator) in query in ms access

i have the following relational database tables 我有以下关系数据库表

在此处输入图片说明

to get the author name of a certain book i made the following query 为了获得某本书的作者名,我进行了以下查询

SELECT authors.name SELECT authors.name

FROM authors 来自作者

INNER JOIN book_author ON authors.id=book_author.author_id INNER JOIN book_author ON authors.id = book_author.author_id

INNER JOIN books 内联书

ON books.id=book_author.book_id WHERE books.id=1; 在books.id = book_author.book_id上,在books.id = 1;

but it is giving me the error in the title .How i can fix that ? 但是它给了我标题错误。我该如何解决?

Name is not a field in the table "authors". 名称不是表“作者”中的字段。 Select authors.author_name and it will run. 选择authors.author_name它将运行。

SELECT authors.author_name

FROM authors

INNER JOIN book_author ON authors.id=book_author.author_id
WHERE book_author.book_id=1;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM