Advertisement
pharmokan

MySQL sort database by largest amount of rows

May 21st, 2020
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. SELECT TABLE_NAME AS "Table Name",
  2. table_rows AS "Quant of Rows", ROUND( (
  3. data_length + index_length
  4. ) /1024, 2 ) AS "Total Size Kb"
  5. FROM information_schema.TABLES
  6. WHERE information_schema.TABLES.table_schema = 'global2'
  7. ORDER BY
  8. table_rows DESC
  9. LIMIT 0 , 30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement