SQL SELECT Database

When you have multiple databases in your SQL Schema, then before starting your operation, you would need to select a database where all the operations would be performed. SQL SELECT Database

The SQL USE statement is used to select any existing database in the SQL schema.

Syntax

The basic syntax of the USE statement is as shown below −

USE DatabaseName;

Always the database name should be unique within the RDBMS.

Example

if you want to work with the db5 in database, then you can execute the following SQL command and start working with the db5 database.

 USE DB5;
Scroll to Top