Skip to main content
Counts the number of tokens that would be used in generating the SQL in an equivalent GENERATE SQL call. This is, effectively, the number of combined tokens in the given contexts.
GENERATE TOKENS Syntax

Parameters

WITH OPTIONS

Optional indicator that a comma-delimited list of token generation option/value assignments will follow.See SQL Token Generation Options for the complete list of options.

SQL Token Generation Options

The following options can be specified to modify the way the counted tokens are generated.

context_name

Name of the SQL-GPT context to use as a basis for counting generated tokens; should be of the form [<schema name>.]<context name>.

context_names

Comma-separated list of names of SQL-GPT contexts to use as the basis for counting generated tokens; each should be of the form [<schema name>.]<context name>, and the entire list should be single-quoted.For example:

SQL Token Generation Examples

To count the generated tokens for the example.atc_ctx SQL-GPT context:
GENERATE TOKENS Example