22,209
社区成员
发帖
与我相关
我的任务
分享
declare @list varchar(100)
set @list = '11,12'
exec ('select * from fype in('+@list+')')
declare @1 bigint, @2 bigint, @3 bigint, @4 bigint
select top 1 @1 = id from sysobjects order by id
select top 1 @2 = id from sysobjects order by id desc
select * from sysobjects where id in (@1,@2,@3,@4)
declare @a int
declare @b int
set @a =11
set @b = 12
select * from table where fype in (@a,@b)
declare @ftype varchar(255)
set @ftype='11,12'
select * from tb where charindex(','+ltrim(fype)+',',','+@ftype+',')>0