Solveeit Logo

Question

Computer Science Question on SQL

Amit wants to be familiar with SQL. One of his friends Anand suggests him to execute the following SQL commands:
(A) Create Table Student
(B) Use Database DB
(C) Select * from Student
(D) Insert into Student
In which order Amit needs to run the above commands?

A

(A), (B), (C), (D)

B

(A), (B), (D), (C)

C

(B), (A), (D), (C)

D

(C), (B), (D), (A)

Answer

(B), (A), (D), (C)

Explanation

Solution

The correct sequence is to select the database first (USE DATABASE DB), then create the table, insert data, and finally retrieve data using SELECT.