Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Number of affected rows?
Hi Gyula
If you want to get the number of rows affected without executing the
insert or update then
select count would be easiest.
eg. if you want to delete from a table
delete from EMP where empno=9999;
You can do a select count(*) from EMP where empno=9999;
This will give you a value for the number ofrecords that will be deleted.
Suhen
>>> gy.andor_at_euromacc.hu 10/27/00 01:25PM >>>
Hi Suhen,
I do it the way you recommended, but I'd like to aviod it. Is it possible?
Suhen Pather wrote:
>
> Hi Gyula
>
> You can do a select count for the same delete or update statement
>
> HTH
> Suhen
>
> >>> gy.andor_at_euromacc.hu 10/27/00 11:01AM >>>
> Hi Gurus,
>
> Is there any way to get the a number of affected rows after an
update
> or delete statement?
>
> Thanks in advance
> Gyula Andor
> --
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Andor Gyula INET: gy.andor_at_euromacc.hu Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Oct 27 2000 - 05:42:34 CDT