Skip to main content

USE (bSQL) | Blockpoint Docs

Changes the database context to the specified database.

bSQL Syntax Conventions.

Syntax​

USE database_name; 

Arguments​

database_name
Is the name of the database to which the user context is switched.

Remarks​

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 after the USE statement are executed in the specified database.

Examples​

A. Using a database.​

The following example changes the database context to the financial database.

This example uses the Financial Demo Database.

USE financial;

See Also​