MSSQL Veritabanında ki Tablolarda Bulunan Kayıt Sayıları
SELECT OBJECT_NAME(OBJECT_ID) [Tablo Adı], st.row_count
as[Satır Sayısı]
FROM sys.dm_db_partition_stats st
WHERE index_id < 2 AND
OBJECT_NAME(OBJECT_ID) NOT LIKE '%sys%'
ORDER BY st.row_count, [Tablo Adı] asc
SELECT TAbloAdi = so.name, [RowCount] = MAX(si.rows)
FROM sysobjects so, sysindexes si WHERE so.xtype = 'U' AND si.id = OBJECT_ID(so.name)
GROUP BY so.name
ORDER BY 2 DESC
Yorumlar
Yorum Gönder