Changes the database context to the specified database.
Is the name of the database to which the user context is switched.
When an MDB login connects to MDB, the login automatically connects to its default database and acquires the security context of a database user. If no database user has been created for the MDB login, the login fails. If no default database has been assigned to the login, its default database will be set to master.
USE is executed at both compile and execution time and takes effect immediately. Therefore, statements that appear in a batch
USE statement are executed in the specified database.
A. Using a database.
The following example changes the database context to the
This example uses the Financial Demo Database.