Mysql
 sql >> Database >  >> RDS >> Mysql

Come distinguere tra gli stessi nomi di campo di due tabelle in una query di selezione?

Scrivi così,

select a.field1 as af1,a.field2 as af2,a.field3 as af3,b.field1 as bf1,b.field2 as bf2,b.field3 as bf3,c.field1 as cf1,c.field2 as cf2,c.field3 as cf3 from table A as a, table B as b,table C as c where so and so.