当前位置: 代码迷 >> Sql Server >> 疑难有关问题,来解决
  详细解决方案

疑难有关问题,来解决

热度:103   发布时间:2016-04-27 15:12:40.0
疑难问题,高手进来解决,在线等
是这样的
如何将查询结果条数赋给一个变量
SQL查询语句该怎么写

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

select @int = count(*) from tablename


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

set @count=(select count(*) from tablename where ......)
  相关解决方案