0
在某些數據庫中,while update更新查詢已停止返回合理的受影響行數。對於此服務器上的其他數據庫,情況並非如此。我會做一些簡單的像SQL Server在簡單查詢中返回奇怪的受影響行數
update calendaritems set isdeleted = 1 where startdate = '2016-01-01 9:00' and contactid = 5
,並返回此:
(12 row(s) affected)
(12 row(s) affected)
#289#
(532 row(s) affected)
(6 row(s) affected)
(24 row(s) affected)
(12 row(s) affected)
的12S是正確的,不知道他們爲什麼要印刷三次,爲什麼有其他受影響的行數,更不用說標籤號碼。
的SQL Server 2008 R2 SP2
觸發效果;) –
我的猜測是你的更新可能觸發表上的觸發器,而過多的輸出是觸發器處理和輸出。 – jpw
更新該表,導致5個其他表得到更新。表中必須有觸發器。 – Eric