Which command in MySQL is used to list all (non-temporary) tables in a given…

2023

Which command in MySQL is used to list all (non-temporary) tables in a given database?

  1. A.

    DESCRIBE TABLES

  2. B.

    DISPLAY TABLES

  3. C.

    VIEW TABLES

  4. D.

    SHOW TABLES

Attempted by 2094 students.

Show answer & explanation

Correct answer: D

SHOW TABLES displays the list of all non-temporary tables present in the selected MySQL database.

Usage examples: SHOW TABLES; — List tables in the currently selected database.

SHOW TABLES FROM database_name; — List tables in a specified database without changing the current database.

SHOW FULL TABLES; — Show table names along with their type (e.g., BASE TABLE or VIEW).

SHOW TABLES LIKE 'pattern'; — Filter listed tables using a pattern.

Note: Temporary tables created with CREATE TEMPORARY TABLE are session-specific and may not appear in SHOW TABLES for other sessions; SHOW TABLES by default lists only non-temporary tables.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Up Lt Grade Assistant Teacher 2025