我有两张桌子:book&出版商
书籍栏目是:book_code,title,publisher_code
发布商列是:publisher_code,publisher_name
我正在尝试使用book_code,publisher_code和&amp ;; PUBLISHER_NAME
到目前为止,这就是我所拥有的:select book_code, title, a.publisher_code
from book a
inner join publisher p
on a.publisher_code = p.publisher_code;
我不确定如何显示publisher_name
答案 0 :(得分:0)
在mysql中我就是这样写的:
SELECT
b.book_code,
b.title,
b.publisher_code,
p.publisher_name
FROM
book AS b
JOIN publisher AS p USING (publisher_code);