SQL statement support
The SQL statement support in Trino can be categorized into several topics. Many statements are part of the core engine and therefore available in all use cases. For example, you can always set session properties or inspect an explain plan and perform other actions with the globally available statements.
However, the details and architecture of the connected data sources can limit some SQL functionality. For example, if the data source does not support any write operations, then a DELETE statement cannot be executed against the data source.
Similarly, if the underlying system does not have any security concepts, SQL statements like CREATE ROLE cannot be supported by Trino and the connector.
The categories of these different topics are related to read operations, write operations, security operations and transactions.
Details of the support for specific statements is available with the documentation for each connector.
Globally available statements
The following statements are implemented in the core engine and available with any connector:
- CALL
- DEALLOCATE PREPARE
- DESCRIBE INPUT
- DESCRIBE OUTPUT
- EXECUTE
- EXECUTE IMMEDIATE
- EXPLAIN
- EXPLAIN ANALYZE
- PREPARE
- RESET SESSION
- SET SESSION
- SET TIME ZONE
- SHOW FUNCTIONS
- SHOW SESSION
- USE
- VALUES
Catalog management
The following statements are used to manage dynamic catalogs:
Read operations
The following statements provide read access to data and metadata exposed by a connector accessing a data source. They are supported by all connectors:
- SELECT including MATCH_RECOGNIZE and PIVOT
- DESCRIBE
- SHOW CATALOGS
- SHOW COLUMNS
- SHOW CREATE MATERIALIZED VIEW
- SHOW CREATE SCHEMA
- SHOW CREATE TABLE
- SHOW CREATE VIEW
- SHOW GRANTS
- SHOW ROLES
- SHOW SCHEMAS
- SHOW TABLES
- SHOW STATS
Write operations
The following statements provide write access to data and metadata exposed by a connector accessing a data source. Availability varies widely from connector to connector:
Data management
Schema and table management
View management
Materialized view management
User-defined function management
The following statements are used to manage Introduction to UDFs:
Security operations
The following statements provide security-related operations to security configuration, data, and metadata exposed by a connector accessing a data source. Most connectors do not support these operations:
Connector roles:
Grants management:
Transactions
The following statements manage transactions. Most connectors do not support transactions: