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.
Related Questions on MySQL Miscellaneous
How is communication established with MySQL?
A. SQL
B. Network calls
C. A programming language like C++
D. APIs
Which type of database management system is MySQL?
A. Object-oriented
B. Hierarchical
C. Relational
D. Network
Join The Discussion