例如替换
TransactionID
--------
1
2
3
和
TransactionID
--------
95
96
97
分别。基本上,我想用数字替换数字,但是对于多个项目,而不为每个项目编写更新语句。
例子:
Update BatchItem
set TransactionID = '95'
where BatchItemID = 12345**6**
Update BatchItem
set TransactionID = '96'
where BatchItemID = 12345**7**
Update BatchItem
set TransactionID = '97'
where BatchItemID = 12345**8**
如何编写上述语句以按顺序更新多个 transactionID?