当前位置:Gxlcms > mysql > hiveunionall嵌套使用

hiveunionall嵌套使用

时间:2021-07-01 10:21:17 帮助过:61人阅读

不多说了,直接上代码 无 select id from (select a.id from (select 1 as id from duaunion all select 2 as id from dua) a join (select 4 as id from dua) f on a.id =f.idunion all select b.id from (select 1 as id from duaunion all select 2 as id

不多说了,直接上代码 <无>
select id from (
	select a.id from 
	(
	select 1 as id from dua
	union all 
	select 2 as id from dua
	) a join 
	(select 4 as id from dua) f on a.id =f.id
union all 
	select b.id from 
	(
	select 1 as id from dua
	union all 
	select 2 as id from dua
	) b join 
	(select 3 as id from dua) e on b.id =e.id
) c
select id from (
select a.id from 
(
select 1 as id from dua
union all 
select 2 as id from dua
union all
select 5 as id from dua
union all 
select 6 as id from dua
) a join 
(
select 4 as id from dua
 union all
select 3 as id from dua
) b on a.id =b.id
) c

人气教程排行