如何通过c#更改存储过程? [英] How to alter Stored procedure by c# ?
本文介绍了如何通过c#更改存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从c#代码执行存储过程的alter script,是否有人对此有任何想法.
如果您有任何演示应用程序,请粘贴答案.
拼命等待您的答复.
在此先感谢.
I want to execute alter script of stored procedure from c# code , does any one have any idea regarding this .
If you have any demo application then please paste with your answer.
Desperately Waiting for your replies.
Thanks in Advance.
推荐答案
只需照常连接,然后发出SQL ALTER命令:
Just connect as usual, and issue an SQL ALTER command:
ALTER PROC [dbo].Sample
@Name varchar(100) OUTPUT
AS
BEGIN
SELECT @Name=Username FROM myTable WHERE iD=2
END
这篇关于如何通过c#更改存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文