如何用sql语句实现合并两个结构不相同的表? select a,b,'' as c,'' as d from table1union all select a,'' as b,c,d from table1 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create view vi_union asselect a,b,'' c,'' d from table1union allselect a,'',c,d from table2 select isnull(a.a, b.a), a.b, b.c, b.d from table1 a full outer join table2 bon a.a = b.a create view vi_union asselect a,b,cast('' varchar(20)) c,cast('' varchar(20)) d from table1union allselect a,'',c,d from table2 create view vi_union asselect a,b,cast('' varchar(20)) c,cast('' varchar(20)) d from table1union allselect a,'',c,d from table2 数据库安装的问题 咨询一下SQL SqlServer 2000用户自定义函数,varchar(4000)长度不够用怎么办? SQL语句问题 用C连接数据库 一個簡單的插入問題 以下SQL错在哪里? 这个sql怎么写呀。。!! 高分求解,类似递归的问题 求一个SQL查询语句 求一条SQL语句,谢谢赐教! 一个有难度的问题?
select a,b,'' c,'' d from table1
union all
select a,'',c,d from table2
on a.a = b.a
select a,b,cast('' varchar(20)) c,cast('' varchar(20)) d from table1
union all
select a,'',c,d from table2
select a,b,cast('' varchar(20)) c,cast('' varchar(20)) d from table1
union all
select a,'',c,d from table2