Programatically find table names in MySQL Database

I wanted to list all the tables in my database on my web application. The current code structure implemented has hard-coded all the tables but the current situation is not feasible when we try to add new tables. So in this article we would learn how to programatically know all the tables inside your MySQL database.

Below query we can connect using programming language using PHP/Java to get all the table name from MySQL meta-data.

Replace $database_name$ by the database name you wish to know the list of tables.

Tagged . Bookmark the permalink.

Leave a Reply