--如何用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