Skip to main content
Alters the configuration of a SQL-GPT context. Multiple context entries can be added & removed in one command. The general form is:
ALTER CONTEXT Syntax

Add Context Table

A context table can be added to a SQL-GPT context.
Add Context Table Syntax
See Table Definition Clause for syntax of the <table definition clause>.

Examples

To add the example.atc_country table to the example.atc_ctx SQL-GPT context:
Add Context Table Example

Drop Context Table

A context table can be removed from a SQL-GPT context.
Drop Context Table Syntax

Examples

To drop the example.atc_country table from the example.atc_ctx SQL-GPT context:
Drop Context Table Example

Add Context Samples

Context samples can be added to a SQL-GPT context that has not been configured with any. To add samples to a context already configured with one or more, first drop all existing samples, and then add the new and any previous samples all at once.
Add Context Samples Syntax
See Sample Definition Clause for syntax of the <sample definition clause>.

Examples

To add a sample query for finding JFK airport’s location to the example.atc_ctx SQL-GPT context:
Add Context Samples Example

Drop Context Samples

Context samples can be removed from a SQL-GPT context that has been configured with one or more.
Drop Context Samples Syntax

Examples

To drop all context samples from the example.atc_ctx SQL-GPT context:
Drop Context Samples Example

Add Context Rules

Context rules can be added to a SQL-GPT context that has not been configured with any. To add rules to a context already configured with one or more, first drop all existing rules, and then add the new and any previous rules all at once.
Add Context Rules Syntax
See Rule Definition Clause for syntax of the <rule definition clause>.

Examples

To add a rule for joining the example.airport_positions table with the atc_current_position table to the example.atc_ctx SQL-GPT context:
Add Context Rules Example

Drop Context Rules

Context rules can be removed from a SQL-GPT context that has been configured with one or more.
Drop Context Rules Syntax

Examples

To drop all context rules from the example.atc_ctx SQL-GPT context:
Drop Context Rules Example