In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you about the comparative operator modifiers in SQLServer. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
There are three keywords in SQLServer that can modify the comparison operators: All, Any, and Some, where Some and Any are equivalent. The official reference document, http://technet.microsoft.com/zh-cn/library/ms187074%28SQL.90%29.aspx, acts between comparison operators and subqueries, acting like Exists, not exists, in, not in, and other logical meanings, which are also supported by SQLServer2000 but are rarely used. The copy code is as follows: set nocount on use tempdb go if (object_id ('T1') is not null) drop table T1 create table T1 (n int) insert into T1 select 2 union select 3 if (object_id ('T2') is not null) drop table T2 create table T2 (n int) insert into T2 select 1 union select 2 union select 3 union select 4 select * from T2 where n > all (select n from T1)-4 select * from T2 where n > any (select n from T1)- -3 select 4-- select * from T2 where n > some (select n from T1)-- 3 select * from T2 where n = all (select n from T1)-- No data select * from T2 where n = any (select n from T1)-- 2 Magi 3-- select * from T2 where n=some (select n from T1)-- 2 Magi 3 select * from T2 where n
< all (select n from t1 ) --1 select * from t2 where n< any (select n from t1 ) --1,2 --select * from t2 where n=a.n)select * from t2 where n >All (select n from T1) they are logically similar, but the treatment of null is just the opposite. the first sentence ignores the null of the subquery and finds out the null of T2 at the same time, while the second sentence ignores that the null of T2 cannot be queried at the same time because of the null in T1.
These are the comparison operator modifiers in the SQLServer shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.