menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Databases

>

Hidden tho...
source image

Mclaughlinsoftware

1w

read

412

img
dot

Hidden thought SQL question

  • If you create table A and insert a row of data and subsequently you create table B and insert a row of data before issuing a ROLLBACK; statement, how many rows of data will you find in table A and table B?
  • Level 1 Understanding: 1 row in table A1 and no row in table B1.
  • Level 2 Understanding: 1 row in table A2 and 1 row in table B2.
  • The second CREATE statement issues an implicit COMMIT, whereas the INSERT statement to table B1 is a 2PC and the ROLLBACK statement undoes the first phase of the INSERT statement.

Read Full Article

like

24 Likes

For uninterrupted reading, download the app