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: Wed, 5 Feb 2003 08:16:09 -0000
Message-ID: <b1qhdd$8p2$1$8302bc10@news.demon.co.uk>

Good point -

I suspect that one could split hairs about the difference in intent between selects and the others. Ultimately, though, it
probably comes down to history rather
than anything else.

"select ... into" was a "natural" thing
to do back in v1.0 of pl/sql; the "returning" clause is a relatively recent enhancement possibly as a completely independent
little project and no-one thought of making it mirror the "select". (Or maybe they did, and it wasn't possible to make it behave consistently across all the current variations of use - when the previously existing technology of the %rowcount handled the issue anyway).

--
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


ctcgag_at_hotmail.com wrote in message
<20030204154852.052$ws_at_newsreader.com>...

>
>However,
>
>Select salary from emp where 0=1;
>
>is also perfectly legimitate, yet it throws a 'no data found'
>exception at runtime if you add the 'into':
>
>Select salary into sal from emp where 0=1;
>
>I would have thought that a 'returning...into' would behave the same
>as 'select...into' does. It may be normal, but it doesn't seem
>particularly intuitive or consistent.
>
>
>Xho
Received on Wed Feb 05 2003 - 02:16:09 CST

Original text of this message

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