开发者

List all table names in a database which begin with "pages_backup"

开发者 https://www.devze.com 2023-03-04 05:02 出处:网络
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 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%'
0

精彩评论

暂无评论...
验证码 换一张
取 消