我想用if循环在C#中编写存储过程 [英] i want to write the stored procedure in C# with if loop

查看:138
本文介绍了我想用if循环在C#中编写存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用if循环在C#中编写存储过程.
if(icounter = 1 && ivalue = 2)
所以我该怎么在C#中的Streded procedure

i want to write the stored procedure in C# with if loop.
if(icounter=1 && ivalue=2)
so how can i do it in C# in Strored procedure

推荐答案

中做到这一点?如果是这样,那么我知道在T-SQL中唯一可能的循环就是while循环,如下所示:

while(@ icount = 1和@ ivalue = 2)
开始
''您的代码在这里
结束

谢谢
Do you mean Stored Procedure in SQL Server? if so then the only loop that I know is possible in T-SQL is while loop like this:

while(@icount=1 and @ivalue=2)
begin
''Your code here
end

Thanks


嗨Astika,

Hi Astika,

while(icount == 1 && ivalue == 2)
{
     //
     // YOUR CODE HERE
     //
}



希望对您有帮助
祝你好运:)



I hope that help
Good luck :)


这篇关于我想用if循环在C#中编写存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆