在Oracle中编写以下查询是否有更短的方法:
select * from booknames where author = 'Doyle' or author ='Brown' or author = 'Martin' or author = 'Kafka';
我不喜欢我要写字段名(作者)4次的声音。
答案 0 :(得分:3)
select * from booknames where author in ('Doyle', 'Brown', 'Martin', 'Kafka');
管理IN运算符使用的规则包括以下内容: