UPDATE b
SET b.update_flag=0
from table1 a
inner join table2 b on a.user_code=b.user_code
where a.pin_number IS NULL
UPDATE a
SET a.pin_number = Adinfo.dbo.udf_ad_Encrypt(b.pin_number)
from table1 a
inner join table2 b on a.user_code=b.user_code
where a.pin_number IS NULL
有人可以帮助我,我怎么能写在SQL Server中输出条款2更新语句输出条款
你是什么意思,“输出条款”?你的意思是这是一个存储过程? –
我应该使用output关键字并从第二个更新语句中获取值,并将这些值插入第一个更新语句中。它可以通过使用输出子句来完成。 – Durga
更新没有“输出”,除了它们影响的行数外,也许。 –