摘要:
SET NOCOUNT ON BEGIN TRY BEGIN TRANSACTION --your logic COMMIT TRANSACTION END TRY BEGIN CATCH IF XACT_STATE() <> 0 --当前请求有活动的用户事务 BEGIN ROLLBACK TRAN 阅读全文
摘要:
USE DBName GO WHILE ( 1 = 1 ) BEGIN UPDATE TOP ( 1000 ) dbo.TableName SET Filter= '' WHERE Filter IS NULL IF @@ROWCOUNT < 1000 BREAK WAITFOR DELAY '00 阅读全文