USE
Name
USE
Description
The USE command allows us to use the database
grammar:
1. USE <[CATALOG_NAME].DATABASE_NAME>
illustrate:
USE CATALOG_NAME.DATABASE_NAMEwill switch the current catalog intoCATALOG_NAMEand then change the current database intoDATABASE_NAME
Example
- If the demo database exists in current catalog, try accessing it:
1. mysql> use demo;
2. Database changed
2. If the demo database exists in catalog hms_catalog, try switching the catalog and accessing it:
1. mysql> use hms_catalog.demo;
2. Database changed
Keywords
1. USE
