Assuming that you're joining data based on colB, you would use: select t1.colA,t2.colA,t3.colA from tblA t1 inner join tblB t2 on t1.colB = t2.colB inner join tblC t3 on t1.colB = t2.colB where...
You can alias the table names, but there's really no way to get around specifying the table identifiers in the select portion. If you try selecting colA, it will throw an error because it has 3 colA available to it. Kelly --- Veysel Harun Sahin <[EMAIL PROTECTED]> wrote: > Hello, > > I have a problem with select statetement. I need to > query and select > records from multiple tables which have the same > column types. I have > done this with left join but my query became so > complex. Because i have > written "left join" between all of my tables and > also if i need to query > something i have to write "tablename.columnname" > syntax for each table. > Now i am looking for a more basic query to be able > to do this. For > example i have 3 tables with the names of "table1", > "table2" and > "table3". All of my tables have 2 columns "cola" and > "colb". I have to > select records whose "cola = something" from all of > my tables with one > query. > > Thanks. > > > --------------------------------------------------------------------- > 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 > ===== ------------------------------------------ Kelly Firkins Computer Junkie Information Systems guy email: [EMAIL PROTECTED] __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com --------------------------------------------------------------------- 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