SQL Statements

This section provides you with an overview of the Structured Query Language (SQL) for Exasol, and how it is used to manage information in Exasol. It includes syntax, usage, and examples of SQL statements used in Exasol.

Syntax Diagrams

The syntax for each statement is presented as a railroad diagram that uses the following conventions:

  • Terminals (elements that must be entered literally in the SQL statement) are represented by rounded boxes with no fill.
  • Non-terminals (placeholders for values or references to other syntax diagrams) are represented by rectangular boxes with a grey fill.

Syntax diagram conventions

Definition of Database (DDL)

The structure of the database is defined using Data Definition Language (DDL). DDL statements can be used to create, modify, and remove schemas and all schema objects such as tables, views, functions, and scripts.

You can use the following statements to create or modify schemas: 

Manipulation of Database (DML)

Using Data Manipulation Language (DML), you can change the content of tables.

You can use the following statements to change the content of a table:

Access Control Using SQL (DCL)

The SQL statements of the Data Control Language (DCL) are used to control the database access rights. Through the management of users and roles as well as the granting of privileges, you can determine who is permitted to perform what actions in the database.

For an introduction to the basic concepts of rights management, and further details such as a list of all privileges, a summary of the access rights for SQL statements, as well as the system tables relevant to rights management, refer to the Database Users and Roles, and Privileges sections.

Additionally, within the SQL reference for each SQL statement, the prerequisites regarding which privileges are necessary for the respective statement are specified.

You can use the following statements for access control:

Query Language (DQL)

Contents from the database can be queried and analyzed with the Data Query Language (DQL).

You can use the following statements to query in the database: 

Verification of the Data Quality

You can use the following data-quality statements to analyze and ensure the quality of the data in the database:

Other Statements

The following list shows the SQL statements that cannot be categorized in any of the above sections: