

# Supported SQL for Aurora DSQL
Supported SQL features

Aurora DSQL supports a wide range of core PostgreSQL SQL features. In the following sections, you can learn about general PostgreSQL expression support. This list is not exhaustive.

## `SELECT` command


Aurora DSQL supports the following clauses of the `SELECT` command.


| Primary clause | Supported clauses | 
| --- | --- | 
|  `FROM`  |    | 
|  `GROUP BY`  |  `ALL`, `DISTINCT`  | 
|  `ORDER BY`  |  `ASC`, `DESC`, `NULLS`  | 
|  `LIMIT`  |    | 
|  `DISTINCT`  |    | 
|  `HAVING`  |    | 
|  `USING`  |    | 
|  `WITH` (common table expressions)  |    | 
|  `INNER JOIN`  |  `ON`  | 
|  `OUTER JOIN`  |  `LEFT`, `RIGHT`, `FULL`, `ON`  | 
|  `CROSS JOIN`  |  `ON`  | 
|  `UNION`  |  `ALL`  | 
|  `INTERSECT`  |  `ALL`  | 
|  `EXCEPT`  |  `ALL`  | 
|  `OVER`  |  `RANK ()`, `PARTITION BY`  | 
|  `FOR UPDATE`  |    | 

## Data Definition Language (DDL)


Aurora DSQL supports the following PostgreSQL DDL commands.


| Command | Primary Clause | Supported Clauses | 
| --- | --- | --- | 
|  `CREATE`  |  `TABLE`  |  For information about the supported syntax of the `CREATE TABLE` command, see [`CREATE TABLE`](create-table-syntax-support.md).  | 
|  `ALTER`  |  `TABLE`  |  For information about the supported syntax of the `ALTER TABLE` command, see [`ALTER TABLE`](alter-table-syntax-support.md).  | 
|  `DROP`  |  `TABLE`  |    | 
|  `CREATE`  |  `[UNIQUE] INDEX ASYNC`  |  You can use this command with the following parameters: `ON`, `NULLS FIRST`, `NULLS LAST`. For information about the supported syntax of the `CREATE INDEX ASYNC` command, see [Asynchronous indexes in Aurora DSQL](working-with-create-index-async.md).  | 
|  `DROP`  |  `INDEX`  |    | 
|  `CREATE`  |  `VIEW`  |  For more information about the supported syntax of the `CREATE VIEW` command, see [`CREATE VIEW`](create-view.md).   | 
| ALTER | VIEW |  For information about the supported syntax of the `ALTER VIEW` command, see [`ALTER VIEW`](alter-view-syntax-support.md).  | 
| DROP | VIEW | For information about the supported syntax of the DROP VIEW command, see [`DROP VIEW`](drop-view-overview.md). | 
|  `CREATE`  |  `SEQUENCE`  |  For information about the supported syntax of the `CREATE SEQUENCE` command, see [`CREATE SEQUENCE`](create-sequence-syntax-support.md).  | 
|  `ALTER`  |  `SEQUENCE`  |  For information about the supported syntax of the `ALTER SEQUENCE` command, see [`ALTER SEQUENCE`](alter-sequence-syntax-support.md).  | 
|  `DROP`  |  `SEQUENCE`  |  For information about the supported syntax of the `DROP SEQUENCE` command, see [`DROP SEQUENCE`](drop-sequence-syntax-support.md).  | 
|  `CREATE`  |  `ROLE`, `WITH`  |    | 
|  `CREATE`  |  `FUNCTION`  |  `LANGUAGE SQL`  | 
|  `CREATE`  |  `DOMAIN`  |    | 

## Data Manipulation Language (DML)


Aurora DSQL supports the following PostgreSQL DML commands.


| Command | Primary clause | Supported clauses | 
| --- | --- | --- | 
|  `INSERT`  |  `INTO`  | `VALUES`SELECT | 
|  `UPDATE`  |  `SET`  |  `WHERE (SELECT)` `FROM, WITH`  | 
| DELETE | FROM | USING, WHERE | 

## Data Control Language (DCL)


Aurora DSQL supports the following PostgreSQL DCL commands.


| Command | Supported clauses | 
| --- | --- | 
|  `GRANT`  |  `ON`, `TO`  | 
|  `REVOKE`  |  `ON`, `FROM`, `CASCADE`, `RESTRICT`  | 

## Transaction Control Language (TCL)


Aurora DSQL supports the following PostgreSQL TCL commands.


| Command | Supported clauses | Alias | 
| --- | --- | --- | 
|  `COMMIT`  |  [`WORK` \$1 `TRANSACTION`] [`AND NO CHAIN`]  |  `END`  | 
|  `BEGIN`  |  [`WORK` \$1 `TRANSACTION`] [`ISOLATION LEVEL REPEATABLE READ`] [`READ WRITE` \$1 `READ ONLY`]  |    | 
|  `START TRANSACTION`  |  [`ISOLATION LEVEL REPEATABLE READ`] [`READ WRITE` \$1 `READ ONLY`]  |    | 
|  `ROLLBACK`  |  [`WORK` \$1 `TRANSACTION`] [`AND NO CHAIN`]  |  `ABORT`  | 

## Utility commands


Aurora DSQL supports the following PostgreSQL utility commands:
+ `EXPLAIN`
+ `ANALYZE` (relation name only)