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

posted @ 2016-06-23 18:07  光阴的故事-SKY  阅读(83)  评论(0编辑  收藏  举报