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

Home -> Community -> Usenet -> c.d.o.server -> Re: Bug or Misunderstanding ? Delete...Returning into does not work as I expected

Re: Bug or Misunderstanding ? Delete...Returning into does not work as I expected

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 4 Feb 2003 18:55:47 -0000
Message-ID: <b1p2kf$8ei$1$830fa78d@news.demon.co.uk>

It's normal behaviour.

Simple delete statements are
allowed to affect zero rows - so it
would not be sensible to raise an
error because you have appended
the RETURNING clause.

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Coming soon a new one-day tutorial:
Cost Based Optimisation
(see http://www.jlcomp.demon.co.uk/tutorial.html )

____UK_______March 19th
____USA_(FL)_May 2nd


Next Seminar dates:
(see http://www.jlcomp.demon.co.uk/seminar.html )

____USA_(CA, TX)_August


The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


FC wrote in message ...

>Hello folks,
>I just ask you whether I misunderstood the documentation or it's a
PL/SQL
>bug.
>Facts:
> Oracle 8.1.7.0.0 EE, Windows 2000 Pro.
>
>...
>Delete from configurations
> where cfg = num_cfg --
this is a
>PK on table
>returning cfg_dsc into var_cfg_description;
>...
>
>Now, I would expect an exception like NO_DATA_FOUND to be raised if
num_cfg
>does not match any existing record, because the returning clause
cannot
>return any value, but this doesn't happen.
>
>Of course there are simple workarounds if one needs to raise an error
but I
>didn't find any comment about this behaviour in the PLSQL user's
guide and
>reference, is this normal?
>
>Bye,
>Flavio
>
>
Received on Tue Feb 04 2003 - 12:55:47 CST

Original text of this message

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