Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Bug or Misunderstanding ? Delete...Returning into does not work as I expected
"kn" <keldnielsen<nope>@<nope>image.dk> wrote:
> > 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.
> >
> then an update returning of say 3 rows. should raise to_many_rows ?
That's what I would have thought it would do, yes. If I wanted to return a value from all of the rows, I'd use BULK COLLECT. If I wanted it from none of the rows, I'd use an unadorned update. I really don't see why you'd want to update multiple rows and return a value from a random one of them. I'd assume "returning into" a scalar was an assertion that exactly one row will be affected, just as "select into" is.
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup Service New Rate! $9.95/Month 50GBReceived on Tue Feb 04 2003 - 18:40:05 CST