
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to retrieve table names from a database in MySQL?
To retrieve table names from a database in MySQL, the syntax is as follows −
show tables from yourDatabaseName;
Let us implement the above query in order to retrieve table names from a database in MySQL −
mysql> show tables from hb_student_tracker;
This will produce the following output −
+------------------------------+ | Tables_in_hb_student_tracker | +------------------------------+ | demotable192 | | demotable193 | | demotable194 | | demotable195 | | demotable196 | | demotable197 | | demotable198 | | demotable199 | | demotable200 | | demotable201 | | demotable202 | | demotable203 | | demotable204 | | demotable205 | | demotable206 | | demotable207 | | demotable208 | | demotable209 | | demotable210 | | demotable211 | | demotable212 | | demotable213 | | demotable214 | | demotable215 | | demotable216 | | demotable217 | | demotable218 | | demotable219 | | demotable220 | | demotable221 | | demotable223 | | demotable224 | | demotable225 | | demotable226 | | demotable227 | | demotable228 | | demotable229 | | demotable230 | | demotable231 | | demotable232 | | demotable233 | | insertcurrentdate | | reorderintegerexcept0 | | student | +------------------------------+ 44 rows in set (0.00 sec)
- Related Articles
- How to get all table names from a database using JDBC?
- How to retrieve a record from an existing table in a database using JDBC API?
- Are MySQL database and table names case-sensitive?
- How to retrieve a record from an existing table in oracle database using JDBC API?
- How to copy a table from one MySQL database to another?
- How to retrieve Date from a table in JDBC?
- How to display the column names from a table excluding some in MySQL?
- How can you delete a table from a database in MySQL Python?
- How can we create a table from an existing MySQL table in the database?
- How to store and retrieve a date into MySQL database using Python?
- How to alter the database engine of a MySQL database table?
- How to get username using ID from another table in MySQL database?
- How to retrieve binary data from a table using JDBC?
- How to retrieve a DATALINK object from a table using JDBC?
- How to delete a table from MongoDB database?

Advertisements