输入参数可以用作输出参数吗? [英] can input parameters be used as output parameters ?

查看:93
本文介绍了输入参数可以用作输出参数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我是代码项目的新用户.请帮助我找到以上答案.
谢谢

hi everybody,
i am a new user in code project. please help me for finding the above answer .
thank you

推荐答案

是的,您可以亲爱的朋友,以仅具有一个out参数的存储过程为例.在此方法中,您可以将输入发送到存储过程并设置相同参数的值,以返回该值.

例如:-
Yes you can dear friend, Take an example of a stored procedure with only one out parameter. In this you can send the input to the stored procedure and set the value of the same parameter in order to return he value.

For E.g.:-
CREATE PROCEDURE GetEmployeeType
   @employeeTypeOrName varchar(80) OUTPUT
AS
BEGIN
   SELECT employeeTypeOrName = EmployeeType
   FROM HumanResources.Employee
   WHERE EmployeeName Like ''%employeeTypeOrName%''
END



如果可以帮助您,请不要忘记将其标记为您的答案.



Please don''t forget to mark this as your answer if it helps you out.


这篇关于输入参数可以用作输出参数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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