select tables from mysql database 1

select tables from mysql database

SELECT table_name 
FROM information_schema.tables 
WHERE table_type = 'base table' AND table_name like '%YOUR TABLE NAME%';

Here is what the above code is Doing:
1. We’re using the information_schema database to query the tables in the database.
2. We’re selecting the table_name column from the tables table in the information_schema database.
3. We’re using a WHERE clause to filter the table_type column to only show base tables.
4. We’re using a WHERE clause to filter the table_name column to only show tables that have the word “YOUR TABLE NAME” in them.

Similar Posts