| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Celko: help with an experiment
71062.1056_at_compuserve.com (--CELKO--) wrote:
MySQL - Win2000 Pro
> 1) SELECT * FROM Foobar;
> [X ] 1
> 2) SELECT MAX(i) FROM Foobar;
> [X ] 1
> 3) SELECT * FROM Foobar WHERE 1 = 0;
> [X ] 1
> 4) SELECT MAX(i) FROM Foobar WHERE 1 = 0;
> [X ] NULL
> 5) SELECT CASE WHEN 1 = 1
> THEN 99
> ELSE COUNT(*) END AS x
> FROM Foobar
> WHERE 1 = 0;
> [X ] Empty set
with or without ; at the end...see below.
> 6) SELECT CASE WHEN 1 = 0
> THEN 99
> ELSE COUNT(*) END AS x
> FROM Foobar
> WHERE 1 = 0;
> [X ] Warning
> [ X] Fatal error
May be one or the other
I leave it to you to judge.
Strangely, though, if you have
THEN 99
ELSE COUNT(*) END AS x
FROM Foobar
WHERE 1 = 0
--------------------------
i.e. without the final ";" - then it's an empty set....
Rgs.
Paul...
> --CELKO--
Received on Sat Jul 06 2002 - 18:36:03 CDT
![]() |
![]() |