- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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)
- Write a MySQL query equivalent to “SHOW TABLES” in sorted order?
- MySQL show tables sort by table name?
- What is the alias to Show Tables in MySQL Result?
- Show only certain items in legend Python Matplotlib
- Exclude certain columns from SHOW COLUMNS in MySQL?
- How do I kill all the processes in MySQL “show processlist”?
- MySQL query to calculate sum from 5 tables with a similar column named “UP”?
- How can I display all databases in MySQL and for each database show all tables?
- Difference between SHOW INDEX, SHOW INDEXES and SHOW KEYS in MySQL?
- How to show all the tables present in the database and server in MySQL using Python?
- Show the background image only once with CSS
- Read-only tables in Lua programming
- Merge two tables with union in MySQL?
- MySQL join two tables?
- Concatenate two tables in MySQL with a condition?