Often database administrators and users want to know how many rows are there in each table or how big is the largest table in the database. Run the following SQL batch from your SQL query window to generates a list of all tables in your database together with the number of rows in each one. The list is sorted by table name but you can easily change the ORDER BY clause to sort it by the number of rows:
Syntax
USE db1
SELECT o.name as [Name], i.rowcnt as [Row Count]
FROM sysindexes i
INNER JOIN sysobjects o ON i.id = o.id
WHERE indid < 2 AND o.xtype = 'U'
ORDER BY Name
This query joins system tables to retrieve information about user tables (where xtype=’U’) and their row counts. You can modify the ORDER BY clause to sort by row count to quickly see your largest tables.
Beekeeper Studio Adalah GUI Database Gratis & Open Source
Alat query SQL & editor terbaik yang pernah saya gunakan. Menyediakan semua yang saya butuhkan untuk mengelola database saya. - ⭐⭐⭐⭐⭐ Mit
Beekeeper Studio cepat, intuitif, dan mudah digunakan. Beekeeper mendukung banyak database dan berfungsi dengan baik di Windows, Mac, dan Linux.
Apa Kata Pengguna Tentang Beekeeper Studio
"Beekeeper Studio sepenuhnya menggantikan alur kerja SQL lama saya. Cepat, intuitif, dan membuat pekerjaan database menyenangkan lagi."
"Saya sudah mencoba banyak GUI database, tapi Beekeeper menemukan keseimbangan sempurna antara fitur dan kesederhanaan. Langsung berfungsi."