从table1中查询出来的某个字段column1作为table2的查询条件,根据column1从table2查询出的结果要和table1再组合成一张新表。

问题:从table1中查询出来的某个字段column1作为table2的查询条件,根据column1从table2查询出的结果要和table1再组合成一张新表。

sql:

select *
from (select column1, column2 from table1) t1,
    (select column1, column3 from table2) t2
where t1.column1 = t2.column2

posted @ 2014-02-27 10:57  562323273  阅读(316)  评论(0编辑  收藏  举报