a pl/sql question

  • From: "Freeman, Donald" <dofreeman@xxxxxxxxxxx>
  • To: "Oracle-L (E-mail)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 30 Apr 2004 10:16:07 -0400

PINE-DFREEMAN> BEGIN
  2  UPDATE emp
  3  SET saL =3D100
  4  WHERE ename =3D 'POKEY';
  5  IF SQL%NOTFOUND THEN
  6  dbms_output.put_line('POKEY NOT FOUND');
  7  END IF;
  8  END;
  9  /

POKEY NOT FOUND
PL/SQL procedure successfully completed.


I got the method from Scott Urman's Oracle 8i Advanced PL/SQL =
Programming Book page 5.  I am by no
means the world's best PL/SQL programmer, or even the best within 100 =
feet of where I am sitting <g>
but this particular event can be handled without an exception.



> -----Original Message-----
> From: oracle-l-bounce@xxxxxxxxxxxxx
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Anu
> Sent: Thursday, April 29, 2004 5:58 PM
> To: oracle-l@xxxxxxxxxxxxx
> Subject: RE: a pl/sql question
>=20
>=20
> I think you need exception here. It will error out if no row=20
> found. It will not go to :
> =20
> IF SQL%NOTFOUND THEN.=20
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: