Lab 4.2 Exercises4.2.1 Make Use of COMMIT, ROLLBACK, and SAVEPOINT in a PL/SQL BlockLog into the CTA schema and enter the following series of commands. (Optionally, you can write the PL/SQL block in a text file and then run the script from the SQL*Plus prompt.)-- ch04_7a.sql BEGIN INSERT INTO student ( student_id, Last_name, zip, registration_date, created_by, created_date, modified_by, modified_date ) VALUES ( student_id_seq.nextval, 'Tashi', 10015, '01-JAN-99', 'STUDENTA', '01-JAN-99', 'STUDENTA','01-JAN-99' ); SAVEPOINT A; INSERT INTO student ( student_id, Last_name, zip, registration_date, created_by, created_date, modified_by, modified_date ) VALUES (student_id_seq.nextval, 'Sonam', 10015, '01-JAN-99', 'STUDENTB','01-JAN-99', 'STUDENTB', '01-JAN-99' ); SAVEPOINT B; INSERT INTO student ( student_id, Last_name, zip, registration_date, created_by, created_date, modified_by, modified_date ) VALUES (student_id_seq.nextval, 'Norbu', 10015, '01-JAN-99', 'STUDENTB', '01-JAN-99', 'STUDENTB', '01-JAN-99' ); SAVEPOINT C; ROLLBACK TO B; END;
|