Can we use commit inside the trigger? If not then how can we save the transaction made by the trigger?



Can we use commit inside the trigger? If not then how can we save the transaction made by the trigge..

Answer / Chandan Kumar Paswan

No, you cannot use COMMIT or ROLLBACK within a trigger. To save the transaction made by a trigger, you must include the trigger in a single transaction with other statements that need to be committed together. In SQL Server, you can use the SAVE TRANSACTION command inside a trigger and then commit the transaction from another stored procedure.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Architecture Interview Questions

What is 2 tier 3 tier architecture?

1 Answers  


What is 3NF?

1 Answers  


What do data architects do?

1 Answers  


What is end user data?

1 Answers  


Explain about the implementation of business logic in stored procedures?

1 Answers  


Explain the benefits of running stored procedure on a database engine?

1 Answers  


Can somebody helps me to arrange these into ascending order depending on their sizes: 1)OLTP 2)ODS 3)DWH 4)DATA MART

2 Answers   Wipro,


Explain about the return statement?

1 Answers  


What is the difference between a user defined function and a stored procedure?

1 Answers  


Where the procedures are stored in database?

1 Answers  


Explain the truncate command? : sql server architect

1 Answers  


Illustrate physical database architecture in brief? : sql server architect

1 Answers  


Categories