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
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
Can we call dml statement in function?
What are pl sql procedures?
How much does sql cost?
How can use stored procedures in sql?
What is the difference between join and natural join?
What is the purpose of the sql select top clause?
What do you think about pl/sql?
How to set up sql*plus output format in oracle?
What is a native sql query?
Why commit is not used in triggers?
What is sql rowcount?
how to get a list of all tables in a database? : Sql dba
What is transaction control language (tcl)?
How can you tell the difference between an index and a view?