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: insert into returns 0 rows

Re: insert into returns 0 rows

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 28 Oct 2004 12:15:16 -0700
Message-ID: <4b5394b2.0410281115.44b525aa@posting.google.com>


Serge Rielau <srielau_at_ca.ibm.com> wrote in message news:<2u9od8F25enldU1_at_uni-berlin.de>...
> Does Oracle support this?
> myvar := (select MIN(thefield) ....)
> "Scalar subqueries" should have "null on empty" semnatics.
>
> Cheers
> Serge

I'll interpret the above as two questions. #1 Does Oracle support:
myvar := (select MIN(thefield) ....)
?

Well, AFAIK not in PL/SQL or embedded SQL. The above looks like some form of PASCAL. I don't think any language supports a SQL construct like that, but I could be wrong. Correct syntax in ORACLE looks like

SELECT MIN(thefield) into :myvar ...

#2 Does Oracle support:
"Scalar subqueries" should have "null on empty" semnatics. ?

YES.
 If the value of the column named "thefield" is null for ALL rows in the result set, then MIN() returns NULL. Same is also true for MAX() and several other group functions. (COUNT() of course never return NULL.) HTH,
   Ed- Received on Thu Oct 28 2004 - 14:15:16 CDT

Original text of this message

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