Arrange the following in order to create 'STUDENT' table in the "Attendance" database:
(A) mysql> USE Attendance;
(B) mysql> DESCRIBE STUDENT;
(C) mysql> CREATE DATABASE Attendance;
(D) mysql> CREATE TABLE STUDENT(RollNumber INT, SName VARCHAR(20), SDateofBirth DATE, GUID CHAR (12), PRIMARY KEY (RollNumber));
Arrange the following in order to create 'STUDENT' table in the "Attendance" database:
(A) mysql> USE Attendance;
(B) mysql> DESCRIBE STUDENT;
(C) mysql> CREATE DATABASE Attendance;
(D) mysql> CREATE TABLE STUDENT(RollNumber INT, SName VARCHAR(20), SDateofBirth DATE, GUID CHAR (12), PRIMARY KEY (RollNumber));
Solution
The database must exist before it can be used, and it must be selected before a table is created in it. The table must exist before it can be described.
C: create the database Attendance
A: select it with USE Attendance
D: create the STUDENT table inside it
B: view the table structure with DESCRIBE STUDENT
Options 1 and 3: DESCRIBE STUDENT (B) comes before the table is created, so it would give an error.
Option 2: USE Attendance (A) comes before the database is created, so it would give an error.
Related questions:
2026: 19 May Shift 1
2026: 11 May Shift 2
2026: 23 May Shift 2