Question:

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 21, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

-- (i) View the list of tables in the database Exam
SHOW TABLES;

-- (ii) View the structure of the table Term1
DESCRIBE Term1;
    
Explanation: The SHOW TABLES command lists all the tables in the currently selected database. Ensure that the database Exam is selected before executing this command using USE Exam. The DESCRIBE command displays the structure of the specified table Term1, including column names, data types, and constraints.
Was this answer helpful?
0
0