SHOW
SHOW TABLES
The SHOW TABLES statement reference.
Syntax
Clauses
FROM | IN
The FROM or IN clause specifies the database to show tables from. If not specified, tables from the current database are shown.
LIKE | ILIKE
The LIKE or ILIKE clause filters table names based on a pattern. ILIKE performs case-insensitive matching.
NOT LIKE | NOT ILIKE
The NOT LIKE or NOT ILIKE clause excludes tables whose names match the specified pattern.
LIMIT
The LIMIT clause restricts the number of rows in the result set.
INTO OUTFILE
The INTO OUTFILE clause writes the result to a file.
FORMAT
The FORMAT clause specifies the output format.
Examples
Show tables containing ‘taco’ in their names:
Result:
Show tables containing ‘TACO’ in their names (case-insensitive):
Result:
Show tables not containing ‘salsa’ in their names:
Result:
Show the first two tables:
Result:
Notes
- If the FROM clause is not specified, the query returns the list of tables from the current database.
- This statement is equivalent to the following query: