Question:medium

Write the SQL commands to perform the following tasks: 
(i) View the list of tables in the database Exam
(ii) View the structure of the table Term1

Show Hint

Use SHOW TABLES} to list tables in a database and DESCRIBE} to view the structure of a specific table.
Updated On: Jan 13, 2026
Show Solution

Solution and Explanation

-- (i) Display all tables within the 'Exam' database.
SHOW TABLES;

-- (ii) Show the schema definition for the 'Term1' table.
DESCRIBE Term1;
    
Explanation: The SHOW TABLES statement retrieves all tables present in the active database. It is recommended to execute USE Exam prior to this command to ensure the 'Exam' database is selected. The DESCRIBE command provides the structural details of the designated table, 'Term1', encompassing its columns, their data types, and any associated constraints.
Was this answer helpful?
0

Top Questions on Miscellaneous