Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Behaviour of SQL%ROW count

707502Dec 18 2009 — edited Dec 21 2009
I 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
This post has been answered by Asheesh Ambardar on Dec 18 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2010
Added on Dec 18 2009
4 comments
3,535 views