SQL中“in”关键字组成的条件格式;它组成的条件表达式的含义

如题所述

in 关键字组成的 条件格式,类似与or ,如下sql所示

select * from [表名] where [列名] in ('a','b','c') 
/*等价于以下sql脚本*/
select * from [表名] where [列名] ='a'
union all 
select * from [表名] where [列名] ='b'
union all
select * from [表名] where [列名] ='c'

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答