Using Transaction on Query

BEGIN TRAN
   BEGIN TRY
      -- Insert all statement
      COMMIT TRAN
   END TRY

   BEGIN CATCH
      RAISERROR('Error',16,1)
      ROLLBACK TRAN
   END CATCH

Comments

Popular posts from this blog

วิธีตั้งค่า NTP บน Primary Domain Controller

เทคนิค Ghost XP ข้าม Spec

การตั้งเวลาระหว่าง Server และ Client