
- 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 get the list of tables in default MySQL database?
As we know that the default MySQL database would be the database that is currently in use for subsequent queries. We can get the list of tables in that database by using SHOW TABLES statement.
mysql> SHOW TABLES; +------------------+ | Tables_in_sample | +------------------+ | employee | | new_student | | student | +------------------+ 3 rows in set (0.00 sec)
The above statement shows the list of table in Sampledatabase.
- Related Articles
- Get a list of non-empty tables in a particular MySQL database?
- How to get the size of the tables of a MySQL database?
- While connecting to one MySQL database, how can I see the list of tables of other MySQL database?
- How can we get the list of tables in a particular database from MySQL Server command line?
- List down all the Tables in a MySQL Database
- Get record count for all tables in MySQL database?
- How to count the number of tables in a MySQL database?
- How can we change the default MySQL database to the given database?
- How can we write PHP script to get the list of MySQL database?
- How can we see MySQL temporary tables in the list of tables?
- Get a list of Constraints from MySQL Database?
- How to List All Tables in a Schema in Oracle Database?
- How to check table status of the tables in a particular MySQL database?
- How can I change the default sort order of MySQL tables?
- How can we get only the name having no other details about the tables in MySQL database?

Advertisements