假如需要一次向SQL Server Insert多条记录,SQL语句应该怎么写呢?接下来的SQL server内容就将为您介绍一次向SQL Server Insert多条记录的方法,供您参考,希望对您学习SQL Server Insert语句能够有所帮助。
如下题目为:
在学生表内添加如下记录
95001,李勇,男,20,CS
95002,刘晨,女,19,IS
95003,王敏,女,18,IS
95004,张立,男,19,MA
96001,徐一,男,20,IS
96002,张三,女,21,CS
96003,李四,男,18,IS
具体代码为:
Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '95001','李勇','男','20','CS' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '95002','刘晨','女',19,'IS' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '95003','王敏','女',18,'IS' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '95004','张立','男',19,'MA' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '96001','徐一','男',20,'IS' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '96002','张三','女',21,'CS' Insert into Student(Sno,Sname,Ssex,Sage,sdept) select '96003','李四','男',18,'IS'