可以的,通过union all来实现。比如:select id,a username,b as col1,c as col2,d as col3,null as col4,null as col5,null as col6,null as col7
from tableAunion allselect id,e username,f as col1,g as col2,h as col3,i as col4,j as col5,k as col6,l as col7
from tableB
from tableAunion allselect id,e username,f as col1,g as col2,h as col3,i as col4,j as col5,k as col6,l as col7
from tableB
解决方案 »
- 请教下,怎么下载服务器上的数据库文件呢~~
- 今天最后一个简简简简简简简简简简简简简单问题!!!!
- SQL语句查询报错,请帮忙解决,谢谢!!!
- 该怎么写这个sql语句呀
- 看看该存储过程??问题在哪???????在线等待!小弟没分了!!抱歉!!!!急急
- 请教附加数据库失败的原因
- 请教一个SQL自定义函数的问题(在线等待)
- 加急!倾分相送!ADO.NET中怎么更新sql server中的image型字段?
- Help me,SQL Server数据库数据恢复问题?
- 在sql2000中如何输入数据?
- 两个相同结构的表查询,需要有个序号.where条件也有序号,该怎么写这个查询语句
- DBA说这种判断。。。不行。。我有点不信
as
select id,a username,b as col1,c as col2,d as col3,null as col4,null as col5,null as col6,null as col7
from tableAunion allselect id,e username,f as col1,g as col2,h as col3,i as col4,j as col5,k as col6,l as col7
from tableB然后,你直接执行试图就可以了:select * from tableA_tableB