世纪佳缘会员个人登录:sql筛选出来的记录怎么创建到一个新表中

来源:百度文库 编辑:神马品牌网 时间:2024/05/13 11:27:20
sql="select * from topic union select * from article union select * from head "
怎么将这三个表中的记录合并到一个新表中?新表如何创建?sql语句
谢谢了!

drop table 新表名 //select into必须是不存在的表,所以先删除
select into 新表名 * from topic union select * from article union select * from head

select * into 新表 from (select * from topic union select * from article union select * from head)