--如何用SQL语句复制表和表中的数据?
select * into copytable from table1
--table1 源表
--copytable 要复制的表
sql 2005表的复制有两种:一种就是把整个表复制过去,就好像复制文件并且重命名。别外一种就是把表的内容复制过出.
select * into newtable form oldtable;把oldtabel复制到newtable且newtable不存在,否则出错.;
if object_id('test') is not null drop synonym test
create synonym test for test.dbo.vdwl_product
select * into vdwl_product from test
select * from vdwl_product