率土之滨攻略武将拆留:怎么生成新表

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 10:47:41
将表topic,article, head 的公共字段id,name,title,content
的记录合并到一个新表news中?新表如何创建?如何生成?sql语句
谢谢了!

select * into 新表 from
((select id,name,title,content from topic)
union all
(select id,name,title,content from article)
union all
(select id,name,title,content from head))a

可以建立一个视图 从这三个表中取这三个字段 以后对视图操作

还能保证数据的同步

如果必须建立新表 可以使用

select 字段 into 新表名 from 表明