Which of the following commands should be used to create a database named “student”?
Correct answer
B. CREATE DATABASE student
20 views
B. CREATE DATABASE student
20 views
CREATE DATABASE student creates a new, empty database named student. You then select it with USE student; before creating tables.
Adding IF NOT EXISTS avoids an error when the database is already there. The other options are not valid SQL syntax.
For more solved questions like this one, see Database Management Systems MCQs on MCQsExam.com.
Not sure why the answer is B? Ask here and get an explanation.