久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

比較 where 子句中的 uniqueidentifier

Compare uniqueidentifier in where clause(比較 where 子句中的 uniqueidentifier)
本文介紹了比較 where 子句中的 uniqueidentifier的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

我們有兩個(gè)表:MainTableCloneOfMainTable

We have two tables : MainTable and CloneOfMainTable

兩個(gè)表的結(jié)構(gòu)是:

ID : int Identity Primarykey
Foo: nvarchar(50) 
RowVersion : uniqueidentifier

我們想通過(guò)比較 RowVersion 和 bla bla ... 來(lái)簡(jiǎn)單地獲取更新的行...

We want to simply get the updated rows by comparing RowVersion and bla bla ...

SELECT * 
FROM MainTable 
INNER JOIN CloneOfMainTable On MainTable.ID = CloneOfMainTable.ID
WHERE MainTable.RowVersion <> CloneOfMainTable.RowVersion

它不起作用^_^"

推薦答案

比較 uniqueidentifier 值沒(méi)有限制.由于該列可以為空,您可以使用 coalesce 來(lái)包含 null 值進(jìn)行比較:

There are no limitations on comparing uniqueidentifier values. As the column is nullable you may use coalesce to include null values in comparison:

WHERE coalesce(MainTable.RowVersion,'00000000-0000-0000-0000-000000000000') <> coalesce(CloneOfMainTable.RowVersion,'00000000-0000-0000-0000-000000000000')

這篇關(guān)于比較 where 子句中的 uniqueidentifier的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應(yīng)該使用什么 SQL Server 數(shù)據(jù)類型來(lái)存儲(chǔ)字節(jié) [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm Does not return all data(Typeorm 不返回所有數(shù)據(jù))
Typeorm .loadRelationCountAndMap returns zeros(Typeorm .loadRelationCountAndMap 返回零)
How to convert #39;2016-07-01 01:12:22 PM#39; to #39;2016-07-01 13:12:22#39; hour format?(如何將“2016-07-01 01:12:22 PM轉(zhuǎn)換為“2016-07-01 13:12:22小時(shí)格式?)
MS SQL: Should ISDATE() Return quot;1quot; when Cannot Cast as Date?(MS SQL:ISDATE() 是否應(yīng)該返回“1?什么時(shí)候不能投射為日期?)
主站蜘蛛池模板: 国产婷婷色一区二区三区 | 福利片在线 | 国产激情视频在线观看 | 少妇特黄a一区二区三区88av | 一区二区三区四区在线视频 | 在线观看成年视频 | 日本aa毛片a级毛片免费观看 | 日韩精品1区2区3区 国产精品国产成人国产三级 | 中文字幕一区二区三区在线视频 | 精品视频在线一区 | 精品免费国产一区二区三区四区 | 91成人免费看片 | 国产免费又黄又爽又刺激蜜月al | 日本成人在线免费视频 | 日韩精品1区2区3区 爱爱综合网 | 狠狠爱视频 | 中文字幕综合 | 日韩久久久久久久 | 免费在线看黄 | 亚洲精品国产成人 | 最新91在线 | 欧美中文字幕一区二区三区 | 久久久久国产精品一区二区 | 久久草在线视频 | 国产视频三级 | 日韩久久综合 | www亚洲免费国内精品 | 亚洲久久久 | 高清国产午夜精品久久久久久 | 久久亚洲精品国产精品紫薇 | 免费一区二区 | 国产成人精品久久二区二区91 | 99精品免费久久久久久久久日本 | 亚洲综合大片69999 | 亚洲欧美一区二区三区1000 | 日韩精品一区二区三区中文字幕 | 日韩三级在线 | 综合久久亚洲 | 中文在线观看视频 | 天天干天天插天天 | 成人免费网站在线 |