Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to use multiple transactions in sql server

BEGIN TRANSACTION;
BEGIN TRY
    DELETE from A
    COMMIT TRANSACTION;
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION;
END CATCH


BEGIN TRANSACTION;
BEGIN TRY
    DELETE     from B
    COMMIT TRANSACTION;
END TRY
BEGIN CATCH
    ROLLBACK TRANSACTION;
END CATCH
Comment

PREVIOUS NEXT
Code Example
Sql :: least spark sql 
Sql :: QUERY JPQL 
Sql :: dumping sql table 
Sql :: mysql order specific records at the top 
Sql :: virtuoso sql query tutorial 
Sql :: pl sql join 3 tables 
Sql :: database name 
Sql :: oracle run_duration to number 
Sql :: mysql update all record removing 2 hours from column 
Sql :: python simple crud application using sqlite 
Sql :: oracle executing sqlplus commands and waiting for completion 
Sql :: sql examples from your work 
Sql :: SQL TABLE : SUBSCRIPTION, PRODUCT, SPECIFICATION 
Sql :: mysql let join 
Sql :: mysql – Error ‘Column count of mysql.user is wrong. Expected 45, found 43. The table is probably corrupted’ on query. 
Sql :: trigger stock phpmyadmin output message 
Sql :: java hide mysql login credentials 
Sql :: mysql page segment 
Sql :: veri seçme SQL 
Sql :: enter postgres shell o localhost 
Sql :: SQLSTATE[HY000] [1298] Unknown or incorrect time zone 
Sql :: fonction stockée pl/sql 
Sql :: Split Column with delimiter into multiple columns 
Sql :: limiting query result using where in sql 
Sql :: T-SQL MERGE with condition what is not matched? 
Sql :: sql python hwo to pass a list in paramerter 
Sql :: findAllBy 
Sql :: Mysql Install Ubuntu with native password 
Sql :: does laravel validate sql 
Sql :: MySQL - How to find word with the most similar beginning 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =