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

比較 where 子句中的 uniqueidentifier

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

問題描述

限時送ChatGPT賬號..

我們有兩個表:MainTableCloneOfMainTable

We have two tables : MainTable and CloneOfMainTable

兩個表的結構是:

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 值進行比較:

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')

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

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

相關文檔推薦

What SQL Server Datatype Should I Use To Store A Byte[](我應該使用什么 SQL Server 數據類型來存儲字節 [])
Interpreting type codes in sys.objects in SQL Server(解釋 SQL Server 中 sys.objects 中的類型代碼)
Typeorm Does not return all data(Typeorm 不返回所有數據)
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轉換為“2016-07-01 13:12:22小時格式?)
MS SQL: Should ISDATE() Return quot;1quot; when Cannot Cast as Date?(MS SQL:ISDATE() 是否應該返回“1?什么時候不能投射為日期?)
主站蜘蛛池模板: 免费观看一级毛片 | www.久久精品视频 | 亚洲国产中文字幕 | www.亚洲免费 | 欧美一级视频在线观看 | 成人免费三级电影 | 午夜爽爽男女免费观看hd | 久久久久资源 | 伊人精品 | 91手机精品视频 | 成人福利网 | www.日韩免费 | 在线伊人 | 亚洲精品国产成人 | 欧美日韩在线成人 | 欧美精品成人 | 久久久激情视频 | 日本国产精品视频 | 97人人超碰| 请别相信他免费喜剧电影在线观看 | 国产伦精品一区二区三区精品视频 | 日本免费黄色一级片 | 97精品超碰一区二区三区 | 亚洲三区在线播放 | 国产视频一二三区 | 国产在线不卡视频 | 精品国产视频 | 欧美三级免费观看 | 久久久精品一区 | 拍真实国产伦偷精品 | 亚洲 欧美 在线 一区 | 一区二区三区亚洲精品国 | 免费一区 | 91大神在线看 | 操操网站 | 人人爽日日躁夜夜躁尤物 | 亚洲精品自在在线观看 | 国产一区二区中文字幕 | 国产成人精品在线播放 | h在线观看 | 久久这里只有精品首页 |