表名:people字段:
name varchar(50)
 age  int
按以上表格写一个批量插入与批量删除的SQL语句,感谢。 

解决方案 »

  1.   

    insert into people([name],age) select [name],age from table-name 
      

  2.   

    declare @temppeople  table(
     name varchar(50)
    ,age int)
    insert into @temppeople values ( '张三',12)
    insert into @temppeople values ( '李思',21)
    insert into @temppeople values ( '网五',22)
    insert into people
    select * from @temppeople
      

  3.   


    declare @temppeople  table(
     name varchar(50)
    ,age int)
    insert into @temppeople
    select  '张三',12
    union all select  '李思',21
    union all select '网五',22