日期:2014-05-18  浏览次数:20376 次

疑难问题,高手进来解决,在线等
是这样的
如何将查询结果条数赋给一个变量
SQL查询语句该怎么写

------解决方案--------------------
select @count=count(*) from tablename where ......
------解决方案--------------------
declare @int int

select @int = count(*) from tablename


------解决方案--------------------

set @count=(select count(*) from tablename where ......)