|
发表于 2020-5-19 22:45:01
|
显示全部楼层
CREATE PROCEDURE Test
@idString NVARCHAR(1000)
AS
DECLARE @sql NVARCHAR(2000)
--如果卡号是字符串
set @idString = '''' + replace(@idString, ',', ''',''') + ''''
SET @sql = 'select * from Users where 卡号 in(' + @idString + ')'
exec @sql
|
|