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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: UPDATE Results

Re: UPDATE Results

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Tue, 21 May 2002 12:26:51 -0800
Message-ID: <F001.00466744.20020521122651@fatcity.com>


> "Burton, Laura L." wrote:
>
> Is there a way to access 'something' that would denote if any rows
> were updated?
>
> Feedback lets you set up how many rows will be effected before a count
> is returned, but WHERE is this number coming from?
>
> I have found a 'Returning' clause of the update statement, but I don't
> really want a value returned, just how many rows were affected.
>
> We have a situation where we want to know if an update statement
> actually updated any rows or in fact did not find a row that met the
> condition. SqlPlus will return '0 rows updated.' Does anyone know
> where 0 is coming from?
>
> Thanks you for your help.
>
> Laura

Anonymous PL/SQL block. Check SQL%ROWCOUNT and if needed use raise_application_error. You can then abort the process with WHENEVER SQLERROR at the SQL*Plus level. If you need to do something more subtle, stay inside the PL/SQL block.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

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 Tue May 21 2002 - 15:26:51 CDT

Original text of this message

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