List all table names in the database that begin with "pages_backup"

I need to provide a list of all the backups available for a particular website. Each backup is a table with a name, for example pages_backup_09_5_11.

I would like to know what SQL I need to write in order to return the names of all tables starting with pages_backup.

I really need a list of dates i.e. bit 09_5_11.

There are other tables in the database that I do not want to return.

+3
source share
1 answer

You can use SHOW TABLESwith condition

SHOW TABLES LIKE 'pages_backup%'
+5
source

All Articles