luxj

1:

select  

        sum(c.row_count) as datacount  
from    sys.indexes a ,  
        sys.objects b ,  
        sys.dm_db_partition_stats c  
where   a.[object_id] = b.[object_id]  
        AND b.[object_id] = c.[object_id]  
        AND a.index_id = c.index_id  
        AND a.index_id < 2  

        AND b.is_ms_shipped = 0 

 

2:

select  b.name as tablename ,  
        a.rowcnt as datacount  
from    sysindexes a ,  
        sysobjects b  
where   a.id = b.id  
        and a.indid < 2  
        and objectproperty(b.id, \'IsMSShipped\') = 0 

分类:

技术点:

相关文章:

  • 2021-08-07
  • 2021-05-22
  • 2022-03-11
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
猜你喜欢
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-12-14
  • 2022-01-28
  • 2021-11-23
  • 2021-08-07
相关资源
相似解决方案