Find tables with a specific string in the name in MariaDB database

The query below finds tables with the string 'ar' in the name.

Query

select table_schema as database_name,
    table_name
from information_schema.tables
where table_type = 'BASE TABLE'
    and table_name like '%ar%'
order by table_schema,
    table_name;

Columns

  • database_name - name of the database (schema) where the table was found
  • table_name - name of the table found

Rows

  • One row: represents one table
  • Scope of rows: all tables found
  • Ordered by: database (schema) name, table name

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.