Oracle SQL查询输入

阿列克谢·斯米尔诺夫(Alexey Smirnov)

我有以下查询,这是行不通的。

select * from table where id in (
   1,2, (select id from another_table)
)

我该如何重写?

皮特

怎么样

select * from table 
where id in (1,2)
   or id in (select id from another_table)

WHERE使用and!!!添加其他条件时,请小心并使用括号

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章