是这样的
如何将查询结果条数赋给一个变量
SQL查询语句该怎么写
------解决方案--------------------
select @count=count(*) from tablename where ......
------解决方案--------------------
declare @int int
select @int = count(*) from tablename
------解决方案--------------------
或
set @count=(select count(*) from tablename where ......)