
急求SqlServer批量插入的存储过程怎么写
1个回答
2015-06-23
展开全部
思路:
1、先拼接好SQL语句
strsql="select 1,3 union all
select 2,3 union all
select 3,3"
strsql="insert into 表 (b_no,b_num) "+strsql
2、在程序里直接执行该SQL语句
1、先拼接好SQL语句
strsql="select 1,3 union all
select 2,3 union all
select 3,3"
strsql="insert into 表 (b_no,b_num) "+strsql
2、在程序里直接执行该SQL语句
追问
是在sqlserver里面执行的,附上在oracle里面的存储过程
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询