我试过 IN,多个类似的子句等。
问题: 列出 Jove、Penguin、Plume 和 Scholastic 出版的书籍。在出版商内按标题组织。
描述表
SQL> 描述书
Name
------------------
BOOK_CODE
TITLE
PUBLISHER_CODE
TYPE
PRICE
PAPERBACK
我试过的sql
SQL> select * from BOOK where Publisher_Code IN(JP,PE,PL,SS)
2 group by Publisher_code, title;
SQL> select * from BOOK
2 where PUBLISHER_CODE IN('%JP%', '%PE%','%PL%', '%SC%')
3 group by title, Publisher_code;
SQL> select * from book
2 where Publisher_code like '%JP%'
3 OR where Publisher_code like '%PE%'
4 OR where Publisher_code like '%PL%'
5 OR where Publisher_code like '%SC%'
6 group by Publisher_code
7 order by title;