[SQL]实现Oracle拷贝表Create table as select

来源:互联网 发布:python使用turtle 编辑:程序博客网 时间:2024/06/07 22:25

Transact-SQL 拷贝表

在做数据迁移的时候会经常复制表,或者只复制表结构,在ORACLE下可以使用:create table as select...,但是在SQLServer下这种语法是错误的。

--Oracle下语法:
create table BranchAccount as select * from TATA.dbo.BranchAccount
--SqlServer下语法:
select * into BranchAccountfrom TATA.dbo.BranchAccount


本文原创由`bluetata`发布于blog.csdn.net、转载请务必注明出处。


Flag Counter