I'm developing a program that can interact with different database servers, including "MySQL" and "MS SQL Server."
I want to use a universal query that should work with all database types to extract the names of the tables in a specific database. I've attempted the following:
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE='BASE TABLE'
But it only provides the table names for the selected database, not those for all the databases on a given server. How can I limit this query to just return tables from a specific database?