2.交叉连接:cross join (where...)
3.sql语句
select * from table1 cross join table2 (where ...)
实际应用中很少这样去设计表,所以查询时也很少这样查询。
查询出来的结果是,俩张表的所有组合情况。
select * from (select a.id as id ,a.name as name from A
union all
select b.id as id ,b.name as name from B
)temp order by id asc
亲,采纳吧!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)