3
避免多个`或`表达式
我有以下oracle SQL及其工作原理,但与所有ors 比较难看。有更简洁的方法吗? SELECT * FROM foobar WHERE (SUBJECT ='STAT' and TERM ='111') or (SUBJECT ='STAT' and TERM ='222') or (SUBJECT ='ENGLISH' and TERM ='555') or (SUBJECT ='COMM' and TERM ='444') or (SUBJECT ='COMM' and TERM ='333') or (SUBJECT ='STAT' and TERM ='666') ...