Examveda
Examveda

What is the statement used to select a default database?

A. USE

B. CREATE

C. DROP

D. SCHEMA

Answer: Option A

Solution(By Examveda Team)

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.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous