create procedure proc_yg
(
@ygcode varchar(50)
)
as
begin
select * from yg where ygcode in (@ygcode)
end
运行:exec proc_yg 'zhang ' 结果正常
运行:exec proc_yg 'zhang,wang ' 无结果
请问输入多个字符串的写法是什么?
------解决方案--------------------
select * from yg where charindex( ', '+ygcode+ ', ', ', '[email protected]+ ', ')> 0