由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - 请教一个oracle下的view的问题
相关主题
一个有关查询的语句How to Import a Datatable as fast as possible?
SQL question...菜鸟问题,急
SQL question: update a field问一道SQL的题 (转载)
请教set和select 的区别SQL 查询已经解决.谢谢Modeler,mirthc,cheungche
Question about the err when export tablemysql 问题 (转载)
Help: "Operation Must Be Updatable Query"请教高手,包子谢
怎样快速得到两个表的交集请问这个query怎么做
请教大虾问题哈,包子谢哈how to write this query
相关话题的讨论汇总
话题: view话题: union话题: oracle话题: fieldlist话题: 问题
进入Database版参与讨论
1 (共1页)
c******a
发帖数: 2516
1
数据库中有两个表 t1 和 t2 ,这两个表的结构是一样的,
现在需要建立一个view,将这两个表的数据融合到一起,
这个建立view的脚本该如何写?
thanks!
z***y
发帖数: 7151
2

If you don't care about the duplicated record:
Try use UNION ALL
create view vw_YourView
as
select [fieldList]
from table1
UNION ALL
select [same fieldList]
from table2
otherwise, use UNION.

【在 c******a 的大作中提到】
: 数据库中有两个表 t1 和 t2 ,这两个表的结构是一样的,
: 现在需要建立一个view,将这两个表的数据融合到一起,
: 这个建立view的脚本该如何写?
: thanks!

1 (共1页)
进入Database版参与讨论
相关主题
how to write this queryQuestion about the err when export table
请问个join的问题Help: "Operation Must Be Updatable Query"
2个月前用过outer join怎样快速得到两个表的交集
请求SQL语句请教大虾问题哈,包子谢哈
一个有关查询的语句How to Import a Datatable as fast as possible?
SQL question...菜鸟问题,急
SQL question: update a field问一道SQL的题 (转载)
请教set和select 的区别SQL 查询已经解决.谢谢Modeler,mirthc,cheungche
相关话题的讨论汇总
话题: view话题: union话题: oracle话题: fieldlist话题: 问题