我想查找字符串:' 1,5,6'
@idstofind = '1,5,6'
来自id表:
idtable
-------
10
20
1
5
9
6
10
和
Result
------
1
5
6
我需要这样的东西:
Select * from dbo.splitstring(@idstofind) as itf in (select * from idtable)
答案 0 :(得分:0)
您可以尝试:
Select id
from idtable
where id in (@idstofind)