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