30-4 向表中插入多条记录

----------------------向表中插入多条记录--------------------


--将TblStudent表的结构和表中的数据备份到TblStudent20140506Backup表中。
--TblStudent20140506Backup表是在执行 select into 语句时创建的。
--select into 语句不能重复执行,因为每次执行都会创建一个TblStudent20140506Backup表。
--TblStudent表结构包括自动编号列都会在TblStudent20140506Backup表创建,但是TblStudent中的约束并不会出现在TblStudent20140506Backup表中。
select * into TblStudent20140506Backup from TblStudent


--只拷贝表结构,不拷贝数据
select top 0 * into TblStudent20140506Backup from TblStudent


-------------------------------------
--使用insert into 表 select ... from 表(TblStudent20140506Backup是已创建好的表)
insert into  TblStudent20140506Backup
select tsname,tsgender,tsaddress,tsphone,tsage,tsbirthday,tscardid,tsclassid
from TblStudent
where tsage=''
原文地址:https://www.cnblogs.com/Strugglinggirl/p/7220930.html