第一个问题:
list<string,int> sqlList=new list<string,int>();
如果for循环出来就是下面的SQLupdate table set title ='abddd' where id =1;update table set title ='d' where id =2;
update table set title ='ab' where id =2;
....................
我想写一个存储过程,只要传title值和id值,能不能实现不用循环sqllist?A.还是只能一条一条传进去?
B.把sql 组合起来传进去?
如“update table set title ='abddd' where id =1;update table set title ='abddd' where id =2......;”第二个问题:
大批量插入数据大家有何好办法??
list<string,int> sqlList=new list<string,int>();
如果for循环出来就是下面的SQLupdate table set title ='abddd' where id =1;update table set title ='d' where id =2;
update table set title ='ab' where id =2;
....................
我想写一个存储过程,只要传title值和id值,能不能实现不用循环sqllist?A.还是只能一条一条传进去?
B.把sql 组合起来传进去?
如“update table set title ='abddd' where id =1;update table set title ='abddd' where id =2......;”第二个问题:
大批量插入数据大家有何好办法??
解决方案 »
- 这句语句应该怎么写?
- 关于触发器纠错!
- 请教一下SQL SERVER中有无实现VB中SPLIT功能的函数?
- 求助 表错误 dbcc checktable repair_allow_data_loss无法修复错误
- zjcxc(邹建) 请帮忙
- 求一个计算统计的SELECT命令...
- sql server2000服务器:Win2k3、CPU占用率近90%,有什么解决办法没?
- 如何用循环将一行记录的每个字段挨个取出
- 太难了。请教如何制作这样复合的报表!!!(用存储过程加游标)
- 想在SQL SERVER2000中做一个数据分页的存储过程,大家都来帮出出主意
- sql2000如何取第3到第4行数据
- 在sql 里面这样的时间怎么处理啊?想了好久没有的方法
2.BULK INSERT
2、SQL处理:将你需要update的值和id传入一个临时表,借助临时表来多表连接更新。