求个仔细的点讲解,因为我才学数据库,所以想深入了解,学习下.谢谢回帖.

解决方案 »

  1.   

    insert into tb (字段1,字段2)
    select '值1','值2' union all
    select '值1','值2' union all
    select '值1','值2' union all
    ...
      

  2.   

    1、
    insert into ta(col......)
    select ....
    union all
    select ....
    ......
    2、
    insert into ta (col...)values(....), (....), (....);
      

  3.   

    如果是重复的记录,用go语句即可.create table #t(id int)insert into #t values(40)
    go 5000select count(*) ct from #tct
    -----------
    5000
      

  4.   

    谢谢.我才学,我想问下你们这个insert into 后面的ta是什么意思?一个是ta,一个是tb.还有那个union all 是什么意思?
      

  5.   

    ta,tb是表名
    union all是合并数据集
      

  6.   

    开发,可以用SQL Server 2008的存储过程+表值参数,一次插入多值:
    http://blog.csdn.net/downmoon/article/details/7431881