
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Only show tables with certain patterns in MySQL âshow tablesâ?
You can use LIKE operator with show tables to display tables with certain pattern. The LIKE is used to set the pattern.
The syntax is as follows -
SHOW TABLES LIKE ‘yourPattern’;
We have the database test and there are some tables with the letter d. Therefore, the pattern we are considering is with d.
Now implement the above syntax to display tables with certain patterns in SHOW TABLES. The query is as follows.
mysql> show tables like '%d_';
The following is the output.
+----------------------+ | Tables_in_test (%d_) | +----------------------+ | differenceinseconds | | lasthourrecords | | skiplasttenrecords | +----------------------+ 3 rows in set (0.04 sec)
- Related Articles
- MySQL show tables sort by table name?
- What is the alias to Show Tables in MySQL Result?
- Write a MySQL query equivalent to âSHOW TABLESâ in sorted order?
- Show only certain items in legend Python Matplotlib
- How can I display all databases in MySQL and for each database show all tables?
- How to show all the tables present in the database and server in MySQL using Python?
- Merge two tables with union in MySQL?
- Exclude certain columns from SHOW COLUMNS in MySQL?
- Read-only tables in Lua programming
- Concatenate two tables in MySQL with a condition?
- MySQL join two tables?
- How can we see MySQL temporary tables in the list of tables?
- MySQL count(*) from multiple tables?
- Fix Error with TYPE=HEAP for temporary tables in MySQL?
- MySQL SELECT from two tables with a single query

Advertisements