当前位置: 代码迷 >> Sql Server >> sql 2005 中的一个有关问题
  详细解决方案

sql 2005 中的一个有关问题

热度:111   发布时间:2016-04-27 19:13:20.0
sql 2005 中的一个问题
就是我新建了一张表,要把以前那表中的数据拷到现在这张表中,该怎么实现??

------解决方案--------------------
SQL code
insert into newtbselect * from oldtb
------解决方案--------------------
SQL code
1、说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 1 <>1 法二:select top 0 * into b from a 2、说明:拷贝表(拷贝数据,源表名:a 目标表名:b) (Access可用) insert into b(a, b, c) select d,e,f from a;
------解决方案--------------------
SQL code
insert into 新表select * from 舊表--or select * into 新表 from 舊表
  相关解决方案