说明:复制表(只复制结构,源表名:a 新表名:b) select * into B..A1 from A..a1 where 1<>1 select * into B..A2 from A..a2 where 1<>1
select * into b..a1 from a.a1 where 1=2 select * into b..a2 from a.a2 where 1=2或:select top 0 * into b..a1 from a.a1 select top 0 * into b..a2 from a.a2
复制结构:在A数据库中右击表---复制---到B数据库的查询分析器中---粘贴---执行复制数据:insert into B..tableName select * from A..tableName or select * into B..tableName from A.tableName
select * into B..a1 from A..a1 where 1=2 select * into B..a2 from A..a2 where 1=2
select top 0 * into B..a1 from A..a1 select top 0 * into B..a2 from A..a2
select * into B..A2 from A..a2 where 1<>1
select * into b..a2 from a.a2 where 1=2或:select top 0 * into b..a1 from a.a1
select top 0 * into b..a2 from a.a2
select * into B..a2 from A..a2 where 1=2
select top 0 * into B..a2 from A..a2
查询分析器--右键A库的a1表--在剪切板中编写脚本--新建
选择B库--右边的窗口粘贴--按F5执行查询分析器--右键A库的a2表--在剪切板中编写脚本--新建
选择B库--右边的窗口粘贴--按F5执行
select top 0 * into b..a2 from a..a2