答案 0 :(得分:3)
您可以使用union
select col1 as A, col2 as B, col3 as C from table1 where col1 = 'foo'
union all
select colA as A, colB as B, colC as C from table2 where colB = 'bar'
答案 1 :(得分:1)
使用连接,可以检索
从table1,table2中选择table1.column,table2.colname table2.colname = table2.colname。
答案 2 :(得分:0)
SELECT tbl1.columnName,tbl2.columnName1,tbl2.columnName2 FROM table1 tbl1 外面申请 ( SELECT columnName1,columnName2 FROM table2 WHERE table2.field_fk = tbl1.filedId )TBL2