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