好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > 被遺忘的SQLServer比較運算符謂詞

被遺忘的SQLServer比較運算符謂詞

熱門標簽:菏澤語音電銷機器人加盟公司 知名電銷機器人價格 外呼系統改進 長沙智能外呼系統 地圖標注牌 湖南電腦外呼系統平臺 電銷機器人公司 需要哪些牌照 廣東防封卡外呼系統原理是什么 分享百度地圖標注多個位置
官方的參考文檔
http://technet.microsoft.com/zh-cn/library/ms187074%28SQL.90%29.aspx
他們作用于比較運算符和子查詢之間,作用類似Exists、not exists、in、not in以及其他邏輯意義,這些語法同樣被SQLServer2000支持但是很少看到有人用它們。
復制代碼 代碼如下:

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,4
--select * from t2 where n>some(select n from t1) --3,4
select * from t2 where n= all (select n from t1 ) --無數據
select * from t2 where n= any (select n from t1 ) --2,3
--select * from t2 where n=some(select n from t1) --2,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 nsome(select n from t1) --1,2
select * from t2 where n> all (select n from t1 ) --1,4
select * from t2 where n> any (select n from t1 ) --1,2,3,4
--select * from t2 where n>some(select n from t1)--1,2,3,4
set nocount off

注意,如果t1中包含null數據,那么所有All相關的比較運算將不會返回任何結果,原因就不用多解釋了。而因為t1和t2表的null的存在他們和not exists之類的比較符會有一些區別。
比如下面兩句
select * from t2 a where not exists(select 1 from t1 where n>=a.n)
select * from t2 where n >all(select n from t1)
他們邏輯上意義很像但是對于null的處理卻是恰恰相反,第一句會忽略子查詢的null而把t2的null同時查出來,第二句卻是忽略了t2的null同時會因為t1中的null而無法查詢到數據。

標簽:福建 天水 珠海 泉州 商洛 呼和浩特 西寧 美容院

巨人網絡通訊聲明:本文標題《被遺忘的SQLServer比較運算符謂詞》,本文關鍵詞  被,遺忘,的,SQLServer,比較,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《被遺忘的SQLServer比較運算符謂詞》相關的同類信息!
  • 本頁收集關于被遺忘的SQLServer比較運算符謂詞的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 日本一区二区三区久久精品| 在线播放高清视频www| 精品一区二区三区视频在线观看| 乌拉特中旗| 欧美精品xxx| 波多野结衣219无码一区| 国产男男Gay??体育生白袜| 中文字幕一区二区区免| 1024手机国产永久看片你懂的| 国产色情性黄?片免费网址| 欧美最猛黑人XXXX黑人表情| 中文字幕有码自拍欧美| 顶女人臀部泄精视频| 91在线视频免费观看| 涩涩综合五月狠狠色婷婷| 波多野结衣一区二区三区高清| 日韩激情视频| 亚洲性色vr| 啊灬啊灬用力…再用力| 男人手机天堂| 经典三级台湾三级在线观看| 古代经典一级毛片| 岛国大片免费观看| 午夜影院免费版| 林府乳妇Np文葡萄多汁| 国产午夜福利片国产一级A片小说 国产91精品一区二区绿帽 | 藏獒又粗又大把我c哭了| 性饥渴的阿?5中字在线观看| 美女解开胸罩喂男人吃奶| 人人澡人人透人人爽| 嗯~啊穿着半透明校服hsav| 国产91精品人妻一区二区| 双性浪货嗯啊趴下粗口hnp| 国产亲子伦XXXXX熟妇视频| 边摸边吃奶边做的视频免费| 老师的朋友| 秋霞无码免费AV鲁丝片秋霞| 伊人色啪啪天天综合网| 顶弄h粗暴男女| 小男生要了我五次下面好紧| 色吧在线视频在线观看|