Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Celko: help with an experiment

Re: Celko: help with an experiment

From: Damian Ibbotson <member_at_dbforums.com>
Date: Wed, 13 Nov 2002 15:18:48 +0000
Message-ID: <2042338.1037200728@dbforums.com>

DB2 7.2.3

CREATE TABLE Foobar (I INTEGER NOT NULL) DB20000I The SQL command completed successfully.

INSERT INTO Foobar VALUES (1)
DB20000I The SQL command completed successfully.

SELECT * FROM Foobar

I


          1

  1 record(s) selected.

SELECT MAX(i) FROM Foobar

1


          1

  1 record(s) selected.

SELECT * FROM Foobar WHERE 1 = 0

I


   record(s) selected.

SELECT MAX(i) FROM Foobar WHERE 1 = 0

1


          -

  1 record(s) selected.

SELECT CASE WHEN 1 = 1 THEN 99 ELSE COUNT(*) END AS x FROM Foobar WHERE 1 = 0 X


         99

  1 record(s) selected.

SELECT CASE WHEN 1 = 0 THEN 99 ELSE COUNT(*) END AS x FROM Foobar WHERE 1 = 0 X


  1 record(s) selected.

--
Posted via http://dbforums.com
Received on Wed Nov 13 2002 - 09:18:48 CST

Original text of this message

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