I'm trying to select tables in a mysql database which have the same ending, e.g. staff_name, manager_name, customer_name (example).
I was thinking of something along the lines of the following because it works if I have a definite table name.
SELECT * FROM "%_name";
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME like '%_name' and TABLE_SCHEMA = 'your_db_name'
If you want to search for tables in your current DB you can do
SHOW TABLES LIKE '%_name'