日期:2014-05-17  浏览次数:21275 次

如何用SQL语句向一个表中插入多行记录
帮个忙、

------解决方案--------------------
SQL code

insert into yourtable (col1)
select 1
union all select 2
union all select 3;

------解决方案--------------------
SQL code

--1:
insert into table(col)
select 1 union all 
select 2 union all 
select 3;

--2:
insert into table (col)
slect 1 
go 100/*执行100次*/

--3:
select * into tableb /*批量插入新表*/ from tablea

------解决方案--------------------
SQL code

--try
insert into table(col)
select 1 union all 
select 2 union all 
select 3;

------解决方案--------------------
探讨
SQL code


--1:
insert into table(col)
select 1 union all
select 2 union all
select 3;

--2:
insert into table (col)
slect 1
go 100/*执行100次*/

--3:
select * into tableb /*批量插入新表*/ fr……

------解决方案--------------------
探讨

SQL code

insert into yourtable (col1)
select 1
union all select 2
union all select 3;