1.

'Class' table has columns RNO and NAME.The following statements are executedSET AUTOCOMMIT = 0;INSERT INTO CLASS VALUES (5, 'Rajiv'); COMMIT;UPDATE CLASS SET NAME = 'Rajeev' WHERE ID = 5;SAVEPOINT A;INSERT INTO CLASS VALUES (6, 'Chris'); SAVEPOINTB;INSERT INTO CLASS VALUES (7, 'Feroze'); SELECT * FROM CLASS;ROLLBACK TO B;SELECT * FROM CLASS;What will be the output of both the above given SELECT statements ?

Answer»

(Case 1 : If RNO is treated as ID, the following solution should be accepted:)

Output of SELECT statement 1 :

RNONAME
5Rajeev
6Chris
7Feroze

Output of SELECT statement 2 :

RNONAME
5Rajeev
6Chris

(Case 2 : If RNO is NOT treated as ID, the following should be accepted:)

Output of SELECT statement 1 :

RNONAME
5Rajeev
6Chris
7Feroz

Output of SELECT statement 2 :

RNONAME
5Rajeev
6Chris


Discussion

No Comment Found

Related InterviewSolutions