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

比較 where 子句中的 uniqueidentifier

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

問題描述

限時(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

我們想通過比較 RowVersion 和 bla bla ... 來簡單地獲取更新的行...

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 值沒有限制.由于該列可以為空,您可以使用 coalesce 來包含 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)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(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ù)類型來存儲(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í)候不能投射為日期?)
主站蜘蛛池模板: 97国产精品视频人人做人人爱 | 久久99视频免费观看 | 992人人草| 日本中出视频 | 91日b| 日本不卡免费新一二三区 | 久久久一二三区 | 国产一二三区电影 | 天天干人人| 亚洲欧美日韩国产综合 | 日p视频免费看 | 亚洲欧美一区二区三区视频 | av在线播放免费 | 久久久性 | 91在线资源| 日韩免费一级 | 狠狠操你| 国产美女在线观看 | 亚洲 中文 欧美 日韩 在线观看 | 亚洲视频在线免费 | 日韩在线电影 | www.久久.com | 一区二区国产在线观看 | 亚洲人免费视频 | 国产97人人超碰caoprom | 欧美在线一区二区三区 | 一区二区三区四区免费观看 | 亚洲国产一区二区三区, | 日本免费小视频 | 91原创视频 | 伊人免费在线 | 黄色片av | 成人精品一区二区三区中文字幕 | 日韩国产欧美一区 | 阿v视频在线观看 | 国产综合精品一区二区三区 | 操久久 | 国产乱码精品一区二区三区中文 | 亚洲日韩中文字幕一区 | 日本黄视频在线观看 | 国产精品三级 |