Supported SQL for Aurora DSQL - Amazon Aurora DSQL
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Supported SQL for Aurora DSQL

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.

ALTER

TABLE

For information about the supported syntax of the ALTER TABLE command, see ALTER TABLE.

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.

DROP

INDEX

CREATE

VIEW

For more information about the supported syntax of the CREATE VIEW command, see CREATE VIEW.

ALTER VIEW

For information about the supported syntax of the ALTER VIEW command, see ALTER VIEW.

DROP VIEW For information about the supported syntax of the DROP VIEW command, see DROP VIEW.

CREATE

SEQUENCE

For information about the supported syntax of the CREATE SEQUENCE command, see CREATE SEQUENCE.

ALTER

SEQUENCE

For information about the supported syntax of the ALTER SEQUENCE command, see ALTER SEQUENCE.

DROP

SEQUENCE

For information about the supported syntax of the DROP SEQUENCE command, see DROP SEQUENCE.

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 | TRANSACTION]

[AND NO CHAIN]

END

BEGIN

[WORK | TRANSACTION]

[ISOLATION LEVEL REPEATABLE READ]

[READ WRITE | READ ONLY]

START TRANSACTION

[ISOLATION LEVEL REPEATABLE READ]

[READ WRITE | READ ONLY]

ROLLBACK

[WORK | TRANSACTION]

[AND NO CHAIN]

ABORT

Utility commands

Aurora DSQL supports the following PostgreSQL utility commands:

  • EXPLAIN

  • ANALYZE (relation name only)