Pergunta

i'm using mysql db & java, so in my application i need to use trigger, but i need to make it save while inserting or updating. when insering new record in table A, trigger will do the work to insert some information in another table B. also when doing update for records in table A, trigger will update records for table B.

if transaction during update or insrt rolledback, does this rolled back any changes done by the trigger.??!!

Foi útil?

Solução

Yes, if the transaction is rolled back, the work done by the trigger will also be rolled back (unless you do some monkeying with transaction scoping inside the trigger to specifically prevent this)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top