0
所以我試着如下爲「列出所有由作家蓋爾書面和由袖珍書印刷書籍」SQL查詢忽略條件
我的數據庫表是
Table: author
authorNumber, authorName
01 Gale
02 Ben
Table: book
bookCode, bookTitle, publishCode
189 Press & Trash PB
3743 Ecommerce PB
Table: publisher
publisherCode, publisherName
PB Pocket Books
BB Batman Books
Table: wrote
bookCode, authorNumber
189 01
3743 02
這是我的查詢,它忽略了我的大風條件,只是得到所有由袖珍書出版的書籍,有什麼幫助?
SELECT bookTitle
FROM Book B, Wrote BC, Author, Publisher PC
WHERE B.bookCode = BC.bookCode
AND B.publisherCode = PC.publisherCode
AND authorName ='Gale'
AND publisherName ='Pocket Books'
GROUP BY bookTitle;