我有一张order
这样的桌子
id | bookId | bookAuthorId
--------------------------
1 3 2
2 2 1
3 1 2
和另一张桌子
bookId | book
---------------
1 bookA
2 bookB
3 bookC
和
bookAuthorId | author
------------------------
1 authorA
2 authorB
我想从具有这样结果集的order
表中获取记录id = 1
id | book | author
我尝试了什么:
select * from order
join bookId,bookAuthorId
on order.bookId = books.bookId
and order.authorId = authors.authorId
我不知道如何加入这些表以获得所需的结果。我该怎么做?