List all table names in a database which begin with "pages_backup"
I need to provide a list of all the backups I have available for a certain website. Each backup is a table 开发者_JAVA百科with a name such as pages_backup_09_5_11
.
I'd like to know what SQL I need to write to return the names of all the tables beginning with pages_backup
.
All I really need is the list of dates, i.e. the 09_5_11
bit.
There are other tables in the database that I don't want returned.
You could use SHOW TABLES
with a condition
SHOW TABLES LIKE 'pages_backup%'
精彩评论