猿问
Oracle中两个select结果拼接在一起(横向拼接)
两个无关联条件的结果进行拼接
喵喵时光机
浏览 1287
回答 2
2回答
湖上湖
如果数据类型相似,可以使用as配合union来结合,例如select c1 as a,c2 as b,null as c from t1 unionselect cc1 as a,cc2 as b,cc3 as c from t2;其中,使用null来确保连个select有相同的列数.前提是两个select选择的同一列的数据类型相似.
0
0
0
PIPIONE
with t1 as (select 1 from dual), t2 as (select 2 from dual)select * from t1, t2
0
0
0
随时随地看视频
慕课网APP
相关分类
Oracle
我要回答