SQL经典问题,大家帮忙回答一下.
<>all等价于 not in
<>some不等价于not in
怎么说明这一点?
[解决办法]
- SQL code
--<>all等价于 not in--<>some不等价于not in declare @a table (id int)insert into @a select 1insert into @a select 2insert into @a select 3insert into @a select 4declare @b table (id int)insert into @b select 4insert into @b select 5insert into @b select 6insert into @b select 7select * from @awhere id<>all(select id from @b)select * from @awhere id<>some(select id from @b where id=4)select * from @awhere id<>some(select id from @b)
[解决办法]
<>all ==》 not in (all)
<>some ==》 in (some)
[解决办法]
这个的理解,逻辑思维稍微好那么一点点的人都应该能了解,估计楼主是静不下心来理解
[解决办法]
用实例去实际操作一些,就可看到区别了,如同一楼。
[解决办法]
SQL..我什么时候才能学完啊..继续学习.刻苦学习.