Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: insert into returns 0 rows
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