Supported SQL for Aurora DSQL - Amazon Aurora DSQL

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

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

COMMIT

BEGIN

[WORK | TRANSACTION]

[READ ONLY | READ WRITE]

Utility commands

Aurora DSQL supports the following PostgreSQL utility commands:

  • EXPLAIN

  • ANALYZE (relation name only)