This is a discussion on eliminating duplicate columns within the MySQL Database forums, part of the Database Forums category; Hi, I am using MySQL 5.0 on Fedora Linux. I have two tables, c and q, which contain several ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am using MySQL 5.0 on Fedora Linux. I have two tables, c and q, which contain several of the same columns. Let's say I want to select all the columns from c, and all the columns from q that do are not in c. So for example, if c contains, "name, city, street, and address" and q contains, "name, city, amount, day", I would want to select everything from c, but only the "amount" and "day" columns from q. Is there a simple way to select from q without specifically listing which columns I want? Thanks, - Dave |
|
|||
|
laredotornado@zipmail.com wrote:
> Hi, > > I am using MySQL 5.0 on Fedora Linux. I have two tables, c and q, > which contain several of the same columns. Let's say I want to select > all the columns from c, and all the columns from q that do are not in > c. So for example, if c contains, "name, city, street, and address" > and q contains, "name, city, amount, day", I would want to select > everything from c, but only the "amount" and "day" columns from q. > > Is there a simple way to select from q without specifically listing > which columns I want? > > Thanks, - Dave > Dave, No, you need to specify the columns. But it's a good idea to always specify the columns anyway, IMHO. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |