USE Statements

  • Capella Columnar
  • reference
March 23, 2025
+ 12
This topic describes how a USE statement sets the database name, scope name, or both for the statement that follows.

When you provide a USE statement, you do not need to explicitly specify a database and a scope in the statement that follows it.

For information about how Capella Columnar organizes entities into a database.scope.database_object hierarchy and resolves names, see Entities in Capella Columnar Services.

Syntax

UseStmnt EBNF
EBNF
UseStmnt ::= "USE" DatabaseAndScopeName
UseStmnt Diagram
"USE" DatabaseAndScopeName

The USE statement only works in a conjunction with another statement in a single request.

Example

This example sets travel-sample to be the database and inventory to be the scope for whatever statement follows if it omits that information.

SQL++
USE `travel-sample`.inventory;