SQL 事务And With
BEGIN TRANSACTION sky_name BEGIN TRY
update ......
COMMIT TRANSACTION sky_name END TRY BEGIN CATCH IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION sky_name END CATCH
删除前100行以外的记录
;WITH CTE AS ( SELECT Customer_ID,rn=ROW_NUMBER() OVER(ORDER BY Customer_ID) FROM RCA_Customer_Master_bak ) DELETE CTE WHERE rn>100