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 / rj

Hello. if any one of them insert statement is wrong then no
data is inserted.
if you used commit statemnt then it also not work means no
data will be saved in table
Thanks
K.....

please write this example and run
i have only change data type in second insert statemnet


create or replace procedure test_emp
begin
insert into emp(EMPNO, ENAME)
values(1,'R');
insert into emp(EMPNO, ENAME)
values(TEST,'01');
insert into emp(EMPNO, ENAME)
values(2,'S');
commit;
end;

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1721


Can we call dml statement in function?

540


What are pl sql procedures?

510


How much does sql cost?

520


How can use stored procedures in sql?

580






What is the difference between join and natural join?

473


What is the purpose of the sql select top clause?

549


What do you think about pl/sql?

529


How to set up sql*plus output format in oracle?

593


What is a native sql query?

494


Why commit is not used in triggers?

576


What is sql rowcount?

554


how to get a list of all tables in a database? : Sql dba

508


What is transaction control language (tcl)?

634


How can you tell the difference between an index and a view?

489