sql 如何将拼的sql语句结果赋值给变量

SET @SQLS='select @AllUser=count(1) from (select PhoneId from '+@TABLE+' where SiteId='+convert(VARCHAR(5),@SiteId)+' AND PhoneId<>'''' AND CONVERT(varchar(10), CreateTime, 120)='''+@time+''' group BY PhoneId) tb'
exec sp_executesql @SQLS,N'@AllUser int out',@AllUser out

            

                  --记录铭心

上一篇:slf4j提示Class path contains multiple SLF4J bindings


下一篇:POJ 3126 Prime Path(BFS求“最短路”)