On 24-Feb-2003 Veysel Harun Sahin wrote:
> Hello list,
> 
> I want to select all the columns in a table except one column. Can I do 
> this without writing all the column names to the query? For example 
> assume that I have table with the name table1 and there are 50 columns 
> in table1 with the names col1, col2, col3.....col50. To be able to 
> select all the columns except col35 I have to write a query like "SELECT 
> col1, col2, ...., col34, col36, ....col50 FROM table1". Is there a 
> simpler way to do this for example using not operator with the column 
> name col35?
> 

Not that I know of. 
Depending on the application & language it might be easier to post-process:

    $result = mysql_query('SELECT * FROM mytable');
    while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
        unset($row[34]);
        echo 'The values :', implode(', ', $row), '<br>';
    }


Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

---------------------------------------------------------------------
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