USE sets the current database for the session. After you run USE, all subsequent operations — including table creation and data queries — target that database by default, so you don't have to fully qualify every table name with database.table.
Applicable engines and versions
USE applies to LindormTable and LindormTSDB. All versions of both engines are supported.
Syntax
USE { database_identifier | DEFAULT }Parameters
| Parameter | Description |
|---|---|
database_identifier | The name of the database to switch to. The database must already exist in the instance. To list available databases, run SHOW DATABASES. |
DEFAULT | Switches to the default database. The default database name is default in both LindormTable and LindormTSDB. |
Examples
Switch to the default database
USE DEFAULT;See also
SHOW DATABASES — list all databases in the instance