| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | June 18 1999 2:25pm |
| Subject: | Re: how to SELECT from table excluding certain columns | ||
| View as plain text | |||
At 2:17 PM -0500 7/13/99, Troy Grady wrote: >Folks- > >Is there any way for a SELECT statement in MySQL to refer to all the >columns in a table _except_ for a specific column or set of columns? i.e. >Something like "SELECT * !(col1, col2, ...) FROM tablename;" No. You could get the table structure with DESCRIBE tbl_name or SHOW FIELDS FROM tbl_name, then construct the list yourself, but that might be more work than you want to do. Of course, since you're using PHP, you could just write a function that takes a table name and returns a list of columns as the result. -- Paul DuBois, paul@stripped Northern League Chronicles: http://www.snake.net/nl/
| Thread | ||
|---|---|---|
| • how to SELECT from table excluding certain columns | Troy Grady | 15 Jun |
| • Re: how to SELECT from table excluding certain columns | Paul DuBois | 18 Jun |
| • Re: how to SELECT from table excluding certain columns | Fred Read | 19 Jun |
| • RE: how to SELECT from table excluding certain columns | Michael L Smith | 16 Jun |
| • Re: how to SELECT from table excluding certain columns | Troy Grady | 16 Jun |
| • Re: how to SELECT from table excluding certain columns | Vivek Khera | 16 Jun |
| • Re: how to SELECT from table excluding certain columns | Fred Read | 19 Jun |
