Consider table customer(cid number(4), cname varchar2(10) ) is created in the database and has no records. Refer to the below statements. Commit; insert into customer values(101,'john'); insert into customer values(102,'james'); delete from customer where cid=101; insert into customer values(103,'mark'); rollback; commit; how many records will be available in the customer table if the above statements are executed in sequential order. Choose the most appropriate option.
Answers
Answered by
4
Answer:
102 and 103 will be shown in table database. Because 101 is deleted
Answered by
8
1st - customer ‘john’ is inserted
2nd - customer james is inserted.
So the table will look like below
3rd - A delete is executed for cid = 101. So record of james will be deleted
4th – customer ‘mark’ is added. So the table will look like below
5th – A roll back is committed. Since a rollback is commited all the DML statement before commited will be erased. And then a commit is executed. So the table will not have any data except for the structure.
Attachments:
Similar questions