List:General Discussion« Previous MessageNext Message »
From:Erich C. Beyrent Date:May 17 2007 3:27pm
Subject:Select question
View as plain text  
I have three tables, all of which have a 'name' column.

If I do:

select table1.*, table2.*, table3.* from ....

I'll end up with a result set that has three 'name' fields, but no way 
to distinguish which table the field belongs to.

I know I can select individual columns like:

select table1.name as foo, table2.name as bar ...

but I need all the columns from each table and that will be very 
tedious.  Is there a way to set a prefix for each table so that the 
results come out like tablename.column?

-Erich-
Thread
Select questionErich C. Beyrent17 May
  • Re: Select questionPeter Brawley17 May