Description:
Change the database context (current, default database).
Syntax:
USE database
database |
Name of the database |
Note:
After connection to the database as a default database it is set either the database 'master' or the database specified in the connection configuration (e.g. ODBC source). That's why it is suitable to change the database context to the required working database by this command after starting the text console for MS SQL Server administration. Don't forget that each statement in the console has to be confirmed by GO command.
Example:
Switchover of the database context to the database 'pm_data'.
USE pm_data