当前位置:数据库 > Oracle >>

oracle数据库的问题

比如表A有 id,name,address 表B有id,nameaddress 同时查询表A和表B 显示的时候要 id name address 表a id 表aname 表aaddress 表bid 表bname 表baddress 怎么做啊
追问:英雄,确实能搜出来,如果还想以id排序呢应该是
select table1.id,table1.name,table1.address from table1 union all select table2.id,table2.name
,table2.address from table2 order by 1;不可以直接用列名
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,