一次向SQL Server Insert多條記錄的方法
作者:佚名
SQL Server Insert多條記錄的方法未必人人都會(huì),下面就將以實(shí)例的方式為您示范一次向SQL Server Insert多條記錄的SQL語(yǔ)句寫法,供您參考。
如果需要一次向SQL Server Insert多條記錄,SQL語(yǔ)句應(yīng)該怎么寫呢?下面就將為您介紹一次向SQL Server Insert多條記錄的方法,供您參考,希望對(duì)您學(xué)習(xí)SQL Server Insert語(yǔ)句能夠有所幫助。
如下題目為:
在學(xué)生表內(nèi)添加如下記錄
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'
【編輯推薦】
責(zé)任編輯:段燃
來(lái)源:
CSDN論壇