Difference between revisions of "Maria DB: show tables;"

From wikieduonline
Jump to navigation Jump to search
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
[[MariaDB]]
+
 
* <code>[[show tables (example)]]</code>
+
MariaDB [(none)]> show tables;
* <code>show table status like '%';</code>
+
ERROR 1046 (3D000): [[No database selected]]
 +
 
 +
== [[MariaDB]] ==
 +
* <code>[[show tables (example)|show tables]]</code>
 +
* <code>[[show table status]]</code>
 +
* <code>show table status like '%';</code> (Includes [[engine type]])
 
* <code>[[show table]] status where name = "YOUR_TABLE_NAME"</code> (Includes [[engine]] type)
 
* <code>[[show table]] status where name = "YOUR_TABLE_NAME"</code> (Includes [[engine]] type)
  
 +
=== Size of MariaDB tables ===
 +
 +
[[SELECT]]
 +
      table_schema as `Database`,
 +
      table_name AS `Table`,
 +
      round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
 +
[[FROM]] information_schema.TABLES
 +
[[ORDER BY]] (data_length + index_length) DESC;
  
[[MongoDB]]
+
Ref: https://stackoverflow.com/questions/9620198/how-to-get-the-sizes-of-the-tables-of-a-mysql-database
* <code>[[show tables]]</code>
 
  
 +
== Related terms ==
 +
* <code>[[create table]]</code>
 +
* <code>[[create database]]</code>
 +
* [[Databases: list tables]]
 +
* [[List databases]]
  
 
== See also ==
 
== See also ==
 +
* {{SQL}}
 
* {{MariaDB}}
 
* {{MariaDB}}
* {{MongoDB}}
 
 
  
 
[[Category:MariaDB]]
 
[[Category:MariaDB]]

Latest revision as of 10:13, 16 December 2022

Advertising: