/
show-tables.rst
51 lines (34 loc) · 998 Bytes
/
show-tables.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.. _ref-show-tables:
===============
``SHOW TABLES``
===============
Lists the tables in the database.
.. rubric:: Table of contents
.. contents::
:local:
Synopsis
========
::
SHOW TABLES [{FROM | IN} table_schema] [LIKE 'pattern' | WHERE expression]
Description
===========
``SHOW TABLES`` can be used to retrieve the table names of the database in
alphabetical order. The same list can be fetched by querying table names of the
``information_schema.tables`` table.
System and BLOB tables are only listed when they are explicitly specified in
``FROM | IN`` clause.
Parameters
==========
:table_schema:
The name of the schema the tables are appropriate to.
Clauses
=======
``LIKE``
--------
The optional ``LIKE`` clause matches only on table names and omits schema
names. It takes a string pattern as a filter and has an equivalent behavior to
:ref:`sql_dql_like`.
``WHERE``
---------
The optional WHERE clause defines the condition to be met for a row to be
returned.