“Transaksi SQL” Kode Jawaban

Mulailah transaksi di SQL

BEGIN TRANSACTION [Tran1]

  BEGIN TRY

      INSERT INTO [Test].[dbo].[T1] ([Title], [AVG])
      VALUES ('Tidd130', 130), ('Tidd230', 230)

      UPDATE [Test].[dbo].[T1]
      SET [Title] = N'az2' ,[AVG] = 1
      WHERE [dbo].[T1].[Title] = N'az'

      COMMIT TRANSACTION [Tran1]

  END TRY

  BEGIN CATCH

      ROLLBACK TRANSACTION [Tran1]

  END CATCH  
Dull Dingo

Transaksi SQL

BEGIN TRANSACTION
BEGIN TRY

UPDATE HESAP SET BAKIYE = BAKIYE - 1000
WHERE Name='Name' AND Surname='Surname'

UPDATE HESAP SET BAKIYE = BAKIYE + 1000
WHERE Name='Name' AND Surname='Surname'

COMMIT
END TRY
BEGIN CATCH
ROLLBACK
END CATCH
Burak ÖVEÇ

Transaksi SQL

BEGIN TRAN T1;  
UPDATE table1 ...;  
BEGIN TRAN M2 WITH MARK;  
UPDATE table2 ...;  
SELECT * from table1;  
COMMIT TRAN M2;  
UPDATE table3 ...;  
COMMIT TRAN T1;
Carnivorous Flamingo

Jawaban yang mirip dengan “Transaksi SQL”

Pertanyaan yang mirip dengan “Transaksi SQL”

Lebih banyak jawaban terkait untuk “Transaksi SQL” di Sql

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya