带有AND和OR的Oracle Query

时间:2015-12-30 06:43:55

标签: sql oracle

如何在Oracle中将以下方案编写为查询

SELECT *
FROM table1
WHERE col1 = 'SOMENAME' WITH (EITHER COL2 = 'Y' OR COL3 = 'Y')

1 个答案:

答案 0 :(得分:4)

您需要使用AND

Select * 
from table1 
where col1 = 'SOMENAME'
 AND (COL2 = 'Y' OR COL3 = 'Y')