Q949
Which statement is used to select a default database?
A.
USE
AnswerB.
CREATE
C.
DROP
D.
SCHEMA
Answer: Option A
Solution
Answer: Option A
Solution:
This question asks about the command used to tell MySQL which database you want to work with. Think of it like choosing a specific folder on your computer to store and access files.
Here's how the options work:
Option A: USE - This is the correct answer! The USE statement tells MySQL which database you want to use for your queries. For example, USE my_database will make the database named "my_database" active.
Option B: CREATE - This is used to create a new database.
Option C: DROP - This is used to delete an existing database.
Option D: SCHEMA - This is a keyword used to refer to the structure of a database, but it doesn't directly select a default database.
Therefore, the correct answer is Option A: USE.