Behaviour of SQL%ROW count
707502Dec 18 2009 — edited Dec 21 2009I have a store procedure with the following code:
Insert into table (table1)
('1', 'kamran');
commit;
IF(SQL%Rowcount>1)
dbms_output.put_line("Successfull");
Else
dbms_output.put_lien("Error");
When I run the abbove store procedure in oracle 8i it prints "Successfull" and when I run the same procedure in
Oracle 10g then it prints "Error".
When I remove the code line "commit" in oracle 10g then it prints "Successful" in 10g as well.
What is the reason for this strange behaviour?????
NOTE: I have checked the values are properly inserting in both that is oracle 8i and oracle 10g