sql server 根据一个表创建另一个表<表结构相同>

来源:互联网 发布:电脑系统优化软件排行 编辑:程序博客网 时间:2024/06/10 20:37
创建表newtable 并完全复制数据
1.select [列名][列名]... into 表名 from
2.create table newtable as select * from oldtable 
如需要进行数据筛选
1.select top 0 [列名][列名]... into 表名 from 表名
2.create table newtable as select * from oldtable where 0=1