Only show tables with certain patterns in mysql "show tables" Only show tables with certain patterns in mysql "show tables" mysql mysql

Only show tables with certain patterns in mysql "show tables"


show tables like 'pattern';


  • use show tables like 'pattern'
  • pattern is a string using wildcard characters "%","_"
  • % matches any number of characters, even zero characters.
  • _ matches exactly one character.

for example:

  • show tables like 'test%' will filter tables such as "test1,testF,test111,testFoo"

  • show tables like 'test_' will filter tables such as "test1,testF"


You don't have to use show tables, you can also query information_schema.TABLES using any filter.