- 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
Display specific table names with MySQL LIKE Operator
To display specific table names with LIKE operator, the syntax is as follows −
select table_name as `anyAliasName` from information_schema.tables where table_name like ‘yourValue%';
Let us implement the above syntax to display specific table names with LIKE operator −
mysql> select table_name as `DemoTable1600` -> from information_schema.tables -> where table_name like 'DemoTable160_%';
This will produce the following output
+---------------+ | DemoTable1600 | +---------------+ | demotable1600 | | demotable1601 | | demotable1602 | | demotable1603 | | demotable1604 | | demotable1605 | | demotable1606 | | demotable1607 | +---------------+ 8 rows in set (0.01 sec)
- Related Articles
- How to restrict MySQL `LIKE` operator to begin with specific characters?
- Display selected records from a MySQL table with IN() operator
- Fetch specific rows from a MySQL table with duplicate column values (names)?
- Display specific name from a table with repeated individual FirstName and LastName using LIKE clause twice
- How to use MySQL SOUNDEX() function with LIKE operator to retrieve the records from table?
- Create a new table with the properties of an old table and without duplicates using MySQL LIKE Operator?
- MySQL query to display records from a table filtered using LIKE with multiple words?
- Display only the employee names with specific salaries in MongoDB documents with employee records?
- MySQL LIKE command doesn't work with strings containing dots to display records beginning with a specific number
- How to display the column names from a table excluding some in MySQL?
- MySQL Quoted table/field names vs unquoted names?
- Get the names beginning with a particular character using LIKE in MySQL
- SHOW TABLE statement with multiple LIKE values in MySQL?
- Create a temporary table similar to a regular table with MySQL LIKE
- Display month names and year from a column with date records with MySQL