直接在系统表里可以得到,不过有可能没有count(*)准确

解决方案 »

  1.   

    Select identity(int,1,1) as id,* Into #tmp1 from 表 where 条件
    select 记录数=Max(ID) from #tmp1
    Drop table #tmp1
      

  2.   

    我认为COUNT(*)是得到数据记录数最好、最方便的途径
      

  3.   

    try:
    set nocount off
    select * from t_info
    select @@rowcount
      

  4.   

    那用这个select sum(1) as 记录数 from 你的表
      

  5.   

    set rs=server.createobject("adodb.recordset")
    sql="select * from table"
    rs.open sql ,conn,1,3
    totalPut=rs.recordcount  
    输出totalPut就可以了!
      

  6.   

    select sum(1) from yourtable
      

  7.   

    select sum(1) as 记录数 from 你的表
      

  8.   

    select rows from sysindexes 
    where id = object_id('YonrTableName') and indid <2
      

  9.   

    select sum(1) as sum
    from usertable
      

  10.   

    select sum(1) as 记录数 from 你的表
    ORselect 1 from 你的表
    select @@rowcount