VeloDB Cloud
SQL Manual
Statments
Utility-Statements
USE

USE

Name

USE

Description

This statement is used to access a database

Syntax:

USE <[CATALOG_NAME].DATABASE_NAME>

Note:

  1. The USE CATALOG_NAME.DATABASE_NAME will switch the current catalog to CATALOG_NAME , and then the current database to DATABASE_NAME

Example

  1. Access the demo database, which exists in the current catalog:

    mysql> use demo;
    Database changed
  2. Access the demo database, which exists in hms_catalog:

    mysql> use hms_catalog.demo;
    Database changed

Keywords

USE

Best Practice