On Thu, Feb 13, 2003 at 02:10:18PM -0500, Luc Foisy wrote:
> BUT
> 
> SELECT Data, CASE WHEN 0 != 0 THEN 'Something' END FROM table
> 
> will return two columns, "Data" and "CASE WHEN 0 != 0 THEN 'Something' END". It 
>would be better if I could do..
> 
> SELECT Data, CASE WHEN 0 != 0 THEN 'Something' AS 'A Column' END FROM table
> 
> and the result set would only contain one column, "Data"
> 
> 
> I am sure people could find a use for it...

  I don't think this would work the way you like. I am pretty tired
  right now, but I can't think of another query that could return a
  variable length list of fields per row. :)

-- 
 Zak Greant <[EMAIL PROTECTED]> | MySQL Advocate |  http://zak.fooassociates.com

MySQL Tip: Allow duplicate values in columns, but force rows to be unique
  mysql> CREATE TABLE lock (t0 TINYINT NOT NULL, t1 TINYINT NOT NULL,
               UNIQUE combination (t0, t1));

EFF: Protecting Freedoms on the New Frontier (http://eff.org)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to