While inserting 10 rows using procedure, if 3rd entry is
having some error, what will be the output? How u will
handle that error?

Answer Posted / raji_4u

IF THE PROCEDURE HAS AN EXCEPTION HANDLER,THEN ALL THE
RECORDS ARE INSERTED EXCEPT THE 3rd RECORD.

IF THE PROCEDURE DOES NOT HAVE THE EXCEPTION HANDLER, THE
EXCEPTION PROPAGATES TO THE CALLING BLOCK'S EXCEPTION SECTION.
IF THE EXCEPTION IS HANDLED, ONLY THE FIRST TWO RECORDS ARE
INSERTED ie(1st, 2nd).

IF THE CALLING BLOCK ALSO DOES NOT HANDLE THE EXCEPTION, NO
RECORDS ARE INSERTED SINCE THE TRANSACTION IS ROLLED BACK.

IF YOU WANT TO HANDLE THE ERROR, PLACE A EXCEPTION HANDLER
IN THE PROCEDURE AND LOG THE ERROR. THIS MAKES ONLY THE 3rd
RECORD TO ROLLBACK AND ALL OTHER RECORDS ARE INSERTED.

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference sql and mysql?

704


How do you declare a variable in pl sql?

745


Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?

735


how to do backup entire database? : Transact sql

880


How to prepare for oracle pl sql certification?

780






What is the difference between between and in condition operators?

726


What is foreign key in sql with example?

680


what is 'mysqladmin' in mysql? : Sql dba

744


How do you explain an index number?

745


How many types of privileges are available in sql?

968


What is record data type?

677


What is identity column in sql server?

718


What is the difference between pl and sql?

737


Can we join same table in sql?

736


What is primary key sql?

713