Home > Database > Mysql Tutorial > sqlserver 批量插入

sqlserver 批量插入

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:39:37
Original
1074 people have browsed it

我写点伪代码: private InsertData(){ var StartId = exec("select max(id) from table1"); for(var i =1;i10;i++){ exec("insert Table1(Name) values('Name"+i.ToString()+"')") } var EndId = exec("select max(id) from table1"); for(var i =StartId;i

我写点伪代码:

private InsertData(){
  var StartId = exec("select max(id) from table1");

  for(var i =1;i

    exec("insert Table1(Name) values('Name"+i.ToString()+"')")

  }
  var EndId = exec("select max(id) from table1");


  for(var i =StartId;i

    exec("insert Table2(MainId) values('"+i.ToString()+"')")

  }

}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template