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!
|
|