Reputation: 134
As in subject title. My database contains a huge amount of auxiliary tables. Would like to build a dropdown list to select table I would like to load content from. This code ... does not work:
SELECT table_name FROM sys.tables WHERE table_name LIKE 'Mytable_%'
Upvotes: 2
Views: 622
Reputation: 133360
In mysql you could access to information_schema filter your db name
SELECT table_name
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = 'your_db_name'
and table_name LIKE 'Mytable_%'
and table_type = 'BASE TABLE';
Upvotes: 3