父亲房子过户给女儿:sql筛选出来的记录怎么创建到一个新表中

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 02:00:15
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)