SQL Tutorial

49 / 68

What are the valid ways of performing a transaction in MySQL?


Note - Having trouble with the assessment engine? Follow the steps listed here


Please login to comment

6 Comments

This comment has been removed.

Hii Jasmeen,
Option 4(Each statement is always a transaction in itself when a new session of MySQL is started) should be incorrect because If server level setting is autocommit = 1, then a new session will start with statement level transaction, else with open transaction

  Upvote    Share

This comment has been removed.

This comment has been removed.

Yes jasmeen,

First option is also incorrect because A statement is transaction or not depends on autocommit and if start trasaction was issued.

And second option is correct because  irrespective of autocommit = 0 or 1, start transaction will start a transactionS

Hence final correct answers are actually  2,3 and 5

  Upvote    Share

okk . THANKS

  Upvote    Share