作者在 2016-10-26 22:50:09 发布以下内容
[1] ----insert into tablename(表名)(firstcol,secondcol......,lastcol)[列名]values('','','')
【values后面跟的值的类型必须跟表中的列名定义的类型相同】
[2]--------------------------------------
insert into Student(S_StuNo,S_Name,S_Sex,S_Height)
select '001','项羽','男','190' union
select '002','刘邦','男','170' union
select '003','貂蝉','女','180' union
select '004','天明','男','155' union
select '005','少司命','女','175' ..........
把一个表中的数据插入到另外的表中
select * into [newTableName] from [Table_Name]
向新表Student_back中插入部分数据-------------
insert into Student_back(S_StuNo,S_Name,S_Sex,S_Height)
select S_StuNo,S_Name,S_Sex,S_Height from Student
where S_Sex='女'