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!

SQL%ROWCOUNT-How it works?

583846Oct 17 2007 — edited Oct 17 2007
Hi,

I wrote the below piece of code.

SQL> DECLARE
2 v_count VARCHAR2(100);
3 v_name VARCHAR2(100);
4 BEGIN
5 SELECT ename INTO V_name FROM emp
6 WHERE empno=1111;
7 v_count:= SQL%ROWCOUNT;
8 DBMS_OUTPUT.PUT_LINE(v_count);
9 END;
10 /

PL/SQL procedure successfully completed.

The PLSQL Procedure was executed succesfully.
But DBMS_OUTPUT.PUT_LINE(v_count); have not displayed anything.

How SQL%ROWCOUNT works?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2007
Added on Oct 17 2007
10 comments
243,588 views