Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Shows the list of tables in the currently selected database, or in another database if db_name is specified.
SHOW [FULL] [TEMPORARY] TABLES [{FROM | IN} db_name]
[[EXTENDED] LIKE pattern | WHERE TABLE_TYPE {= | !=} {'VIEW' | 'BASE TABLE'}]
db_name
is the name of a SingleStore DB database. If db_name
is not specified, then a database must be currently selected (see USE ).\SHOW TEMPORARY TABLES
command run on the child or master aggregator displays only the temporary tables. If this command is run on the leaves, it displays both the temporary tables and global temporary tables.SHOW TABLES
command (without the TEMPORARY
option) run on the child or master aggregator displays the global temporary tables and normal tables, except the temporary tables.FULL
keyword.Suppose a global temporary table globtemp
and a temporary table temptab
exists in the database, along with few normal tables. Run the following commands on the master aggregator to view the tables:
SHOW TABLES;
****
+---------------+
| Tables_in_db1 |
+---------------+
| allviews |
| circle |
| globtemp |
| product |
| reading |
| source |
| stock |
| stockN |
+---------------+
SHOW TEMPORARY TABLES;
****
+---------------+------------+------------+
| Tables_in_db1 | aggregator | connection |
+---------------+------------+------------+
| temptab | 1 | 5 |
+---------------+------------+------------+
SHOW TABLES EXTENDED;
****
+---------------+------------------------+-------------+-------------------+
| Tables_in_db1 | Table_type | distributed | Storage_type |
+---------------+------------------------+-------------+-------------------+
| allviews | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| circle | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| globtemp | GLOBAL TEMPORARY TABLE | 1 | INMEMORY_ROWSTORE |
| product | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| reading | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| source | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| stock | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| stockN | BASE TABLE | 1 | INMEMORY_ROWSTORE |
| temptab | TEMPORARY TABLE | 1 | INMEMORY_ROWSTORE |
+---------------+------------------------+-------------+-------------------+
SHOW TABLES LIKE 's%';
****
+--------------------+
| Tables_in_db1 (s%) |
+--------------------+
| source |
| stock |
| stockN |
+--------------------+
SHOW FULL TABLES WHERE TABLE_TYPE = 'BASE TABLE';
****
+---------------+------------+
| Tables_in_db1 | Table_type |
+---------------+------------+
| allviews | BASE TABLE |
| circle | BASE TABLE |
| product | BASE TABLE |
| reading | BASE TABLE |
| source | BASE TABLE |
| stock | BASE TABLE |
| stockN | BASE TABLE |
+---------------+------------+