Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Simple Select Return Record
Check the value of SQL%ROWCOUNT after your select.
But in general, read books/docs on pl/sql programming before starting to write code.
Igor Neyman, OCP DBA
ineyman_at_perceptron.com
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Kean Jacinta
Sent: Wednesday, June 08, 2005 10:46 PM
To: oracle-l_at_freelists.org
Subject: Simple Select Return Record
hi,
Trying to query a select statement to check if return record existed or not existed.
select employeeid from employee_tbl
where employeeid=5;
If i type this in SQL*PLus, or sql worksheet , i can easily know if the record is found or record not existed in the table.Becoz it will display result if found .
How to know if a record is found or not found in programming code.I need the sql statement to return 0 if not found and return 1 if found.
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 09 2005 - 09:05:49 CDT
![]() |
![]() |