问题已经解决,我定义变量时把char(20)改成varchar(20)就行了,如下:
create procedure stdstion_search
(@number int,@parameter varchar(20))
as
begin
select * from stdstion
where
(case
when @number=0 then
IDs
when @number=1 then
Names
when @number=2 then
SpecialName
end)
like "%"+@parameter
end
其中@parameter我本来是定义成char(20),后改成varchar(20)就行了,可是这是
为什么呢?我还是似懂非懂