2,596
社区成员
发帖
与我相关
我的任务
分享
DECLARE @where varchar(1000)
select @where=' where 1=1 AND id=10000004'
EXEC('DECLARE cursor_a CURSOR FOR select distinct(ID) from table @where')
DECLARE cursor_a CURSOR FOR select distinct(ID) from table where 1=1 AND id=10000004