create table B.test as select * from A.test;--------------结构,数据内容一致,但是不会复制索引以及外键所以分两步:1:create table B.test like A.test;-------复制表结构2:insert into B.test select * from A.test;----------复制数据
USE B GO SELECT TOP 1 * INTO TESTFROM A.dbo.test