讲一下这两个的具体含义
=all 当all子句数据集是一个数据的,作用跟=差不多。
当all子句数据集是多条数据是,返回结果集为空。
select * from table1 where t1=all(select 1)
相当于
select * from table1 where t1=1
当子句数据集是多条数据
select * from table1 where t1=all(select 1 union select 2)没有数据集
IN 操作符允许我们在 WHERE 子句中规定多个值
select * from table1 where t1 in (select 1 union select 2)
当all子句数据集是多条数据是,返回结果集为空。
select * from table1 where t1=all(select 1)
相当于
select * from table1 where t1=1
当子句数据集是多条数据
select * from table1 where t1=all(select 1 union select 2)没有数据集
IN 操作符允许我们在 WHERE 子句中规定多个值
select * from table1 where t1 in (select 1 union select 2)
温馨提示:答案为网友推荐,仅供参考
第1个回答 2018-09-10
一种条件判断 就是 等于所有值或者所有判断;