Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Why SQL%ROWCOUNT is returning 1 even when no records are found

Why SQL%ROWCOUNT is returning 1 even when no records are found

From: Rao, Maheswara <Maheswara.Rao_at_Sungardp3.com>
Date: Fri, 3 Nov 2000 14:35:25 -0500
Message-Id: <10669.121113@fatcity.com>


Hi All,

Could any body help me in the following program problem. In the following program, SQL%ROWCOUNT is always returning 1 even when no record is found. We are stuck on this problem. We will be thankful for any light on why SQL%ROWCOUNT is returning 1 even when no records are found.

create or replace procedure k2 is

   my_rowid varchar2(18);

BEGIN select min(rowid) into my_rowid
  from messages_received
  where

       originator = 'blabla';
dbms_output.put_line (sql%rowcount);

end k2;

/

show errors;

TIA Rao

Maheswara.Rao_at_SunGardP3.com Received on Fri Nov 03 2000 - 13:35:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US