P Table Tr Tdnametd Tdnulltd Tdtypetd Tr Tr Tdcustidtd Tdnot #47
</p> <table> <tr> <td>Name</td> <td>Null?</td> <td>Type</td> </tr> <tr> <td>Cust_id</td> <td>Not null</td> <td>Number(2)</td> </tr> <tr> <td>Cust_Name</td> <td></td> <td>Varchar2(15)</td> </tr> </table> <p>Evaluate the following SQL statements executed in the given order:</p> <pre><code class="language-sql"> ALTER TABLE cust ADD CONSTRAINT cust_id_pk PRIMARY KEY(cust_id) DEFERRABLE INITIALLY DEFERRED; INSERT INTO cust VALUES (1,'RAJ'); --row 1 INSERT INTO cust VALUES (1,'SAM'); --row 2 COMMIT; SET CONSTRAINT cust_id_pk IMMEDIATE; INSERT INTO cust VALUES (1,'LATA'); --row 3 INSERT INTO cust VALUES (2,'KING'); --row 4 COMMIT; </code></pre> <p>Which rows would be made permanent in the CUST table?
This multiple choice question (MCQ) is related to the book/course gs gs117 Database Management System. It can also be found in gs gs117 Transactions - Implementation of Isolation Levels - Quiz No.1.
Name | Null? | Type |
Cust_id | Not null | Number(2) |
Cust_Name | Varchar2(15) |
Evaluate the following SQL statements executed in the given order:
ALTER TABLE cust ADD CONSTRAINT cust_id_pk PRIMARY KEY(cust_id) DEFERRABLE INITIALLY DEFERRED; INSERT INTO cust VALUES (1,'RAJ'); --row 1 INSERT INTO cust VALUES (1,'SAM'); --row 2 COMMIT; SET CONSTRAINT cust_id_pk IMMEDIATE; INSERT INTO cust VALUES (1,'LATA'); --row 3 INSERT INTO cust VALUES (2,'KING'); --row 4 COMMIT;
Which rows would be made permanent in the CUST table?
row 4 only
rows 2 and 4
rows 3 and 4
rows 1 and 4
Similar question(s) are as followings:
Online Quizzes of gs117 Database Management System
Indexing and Hashing - Bitmap Indices - Quiz No.1
gs gs117 Database Management System
Online Quizzes