存储过程不返回任何东西 [英] Stored procedure does not return anything
本文介绍了存储过程不返回任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
找到应该没问题,但在我工作了很长时间后,我无法注意到我在这里做错了什么.
It is should be no problem to find but after long hours at my job I cannot notice what I'm doing wrong here.
有一个非常简单的存储过程:
There is very simple stored procedure:
ALTER PROCEDURE MyProc
@input char(10)
AS
BEGIN
SET NOCOUNT ON;
SELECT isonum
FROM iso where isonum LIKE '%' + @input + '%'
ORDER BY isonum
END
执行查询时:select isonum from iso where isonum like '%2333%'
- 我得到了数据,但是在执行存储过程时:
when executing a query: select isonum from iso where isonum like '%2333%'
- I get the data,but when executing the stored procedure:
exec MyProc '2333'
- 我一无所获???
exec MyProc '2333'
- I get nothing???
这里出了什么问题?
推荐答案
改为 @input char(10)
到 @input varchar(10)
您的 sp 当前正在运行
your sp is currently running
isonum from iso where isonum like '%2333 %'
这篇关于存储过程不返回任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文