久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動:電腦PC端+手機端+微網站+自適應網頁多模板選擇-建站388元起價?。?!
當前位置:主頁 > 網站建設 > 淺析被遺忘的SQLServer比較運算符修飾詞建站知識

淺析被遺忘的SQLServer比較運算符修飾詞建站知識

時間:2023-05-23 12:05:23 閱讀: 文章分類: 網站建設 作者: 網站編輯員

導讀:1建站知識本篇文章是對被遺忘的SQLServer比較運算符修飾詞進行了詳細的分析介紹,需要的朋友參考下seo網站優化軟件建設網站公司。

seo網站優化軟件建設網站公司SQLServer中有三個關鍵字可以修改比較運算符:All、Any和Some,其中Some和Any等價。官方的參考文檔%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 f網站seo優化軟件rom t1 ) --1 select * from t2 where n< any網站seo優化 (select n from t1 ) --1,2 --select * from t2 where n<some(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之類的比較符會有一些區別。比如下面兩句selec網站建設哪家好t * 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而無法查詢到數據。相關seo網站優化軟件建設網站公司。

關鍵詞標簽: SQL 運算符 被遺忘

聲明: 本文由我的SEOUC技術文章主頁發布于:2023-05-23 ,文章淺析被遺忘的SQLServer比較運算符修飾詞建站知識主要講述被遺忘,運算符,SQL網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_5528.html

我的IDC 網站建設技術SEOUC.COM
專注網站建設,SEO優化,小程序設計制作搭建開發定制網站等,數千家網站定制開發案例,網站推廣技術服務。
  • 5000+合作客服
  • 8年從業經驗
  • 150+覆蓋行業
  • 最新熱門源碼技術文章

    主站蜘蛛池模板: 金阳县| 东台市| 阳谷县| 林州市| 嘉兴市| 建宁县| 阿尔山市| 穆棱市| 双峰县| 灵山县| 嘉黎县| 都匀市| 彭泽县| 土默特左旗| 清原| 东乌珠穆沁旗| 连云港市| 甘孜| 舟山市| 黄冈市| 泾阳县| 武夷山市| 思南县| 久治县| 万全县| 清苑县| 涟水县| 榆树市| 枞阳县| 邯郸县| 丰原市| 宜川县| 汝阳县| 淮南市| 库尔勒市| 会宁县| 武功县| 浦城县| 商洛市| 炎陵县| 凤庆县|