ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

What is the statement used to select a default database?

Answer & Solution
Correct Answer: Option A
USE: The USE statement in MySQL is used to select a default database for the current session. It allows you to switch to a different database, and subsequent queries will operate within that selected database until changed again.
CREATE: The CREATE statement in MySQL is used to create new database objects such as tables, indexes, views, etc. It is not used for selecting a default database.
DROP: The DROP statement in MySQL is used to delete database objects such as tables, indexes, views, etc. It is not used for selecting a default database.
SCHEMA: In MySQL, SCHEMA is a synonym for DATABASE. It is used to create, modify, or query database objects. However, it is not used specifically for selecting a default database.

Therefore, the statement used to select a default database in MySQL is Option A: USE.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.