mysql - SQL Query, Get data from multiple tables and query result -
i have table t1, contains contains columns (a , b, c ,d) in pk.
and have more tables. , want data these tables. data per sql query these tables. sql query (query1) follows
select t3.col1 a, t3.col4 f, t4.col h t3, t4 t3.col1 = t4.col2;
now want data table t1 , above query1 result.
select b , c , d , f, h t1, temp t1.a = temp.a;
where temp above sql query1 result.
how can achieve this?
any suggestions.
i'd suggest using explicit join in:
select t1.b, t1.c, ..., t3.col1 a, t3.col4 f, t4.col h t3 join t4 on t3.col1 = t4.col2 join t1 on t1.a = t3.col1;
Comments
Post a Comment