如何用insert批量添加数据?

mudsong 2003-12-12 03:51:19
如何批量添加数据?
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('cc',0,'abc','01-01','abc','010-88888888','root@163.com')
('dd',0,'abc','01-01','abc','010-88888888','root@163.com')
('ee',0,'abc','01-01','abc','010-88888888','root@163.com')
('ff',0,'abc','01-01','abc','010-88888888','root@163.com')
('gg',0,'abc','01-01','abc','010-88888888','root@163.com')

这样不行,难道一定要这样?
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('aa',0,'abc','01-01','abc','010-88888888','root@163.com')
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('bb',0,'abc','01-01','abc','010-88888888','root@163.com')
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('cc',0,'abc','01-01','abc','010-88888888','root@163.com')
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('dd',0,'abc','01-01','abc','010-88888888','root@163.com')
INSERT INTO Users (UserName,Gender,Career,Birthday,Addr,Tel,Email)
VALUES ('ee',0,'abc','01-01','abc','010-88888888','root@163.com')
...全文
988 3 打赏 收藏 举报
写回复
3 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
dlpseeyou 2003-12-12
同意楼上~~~~
  • 打赏
  • 举报
回复
zjcxc 元老 2003-12-12
同意楼上.
  • 打赏
  • 举报
回复
lynx1111 2003-12-12
create table 表一(sGroundNo char(5),iIndex int,iFactorClassSn int)
insert 表一 select 'zd001', 100, 1
union all select 'zd001', 100 , 2
union all select 'zd001', 99 , 3
union all select 'zd001', 100 , 4
union all select 'zd001', 100 , 5
union all select 'zd001', 100 , 6
union all select 'zd001', 100 , 9
union all select 'zd001', 100 , 12
union all select 'zd001', 100 , 16
union all select 'zd001', 100, 14
union all select 'zd001', 100 , 15
union all select 'zd001', 100 , 17
  • 打赏
  • 举报
回复
相关推荐
发帖
MS-SQL Server
加入

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2003-12-12 03:51
社区公告
暂无公告