PostgreSQL
SELECT API Reference
PostgreSQL SELECT features including window functions, CTEs, LATERAL joins and RETURNING.
By EZ4Code Team
SELECT
Advanced SELECT constructs supported by PostgreSQL.
SELECT col, agg() OVER (PARTITION BY ... ORDER BY ...) FROM tblComputes a value over a sliding window of rows related to the current row, without collapsing rows.
Returns: ResultSet
WITH name AS (SELECT ...) SELECT ... FROM nameCommon Table Expression (CTE) that names a subquery and references it in the outer SELECT.
Returns: ResultSet
SELECT ... FROM a, LATERAL (SELECT ... WHERE a.id = ref) bLATERAL join allows a subquery in the FROM clause to reference columns of preceding FROM items.
Returns: ResultSet
INSERT|UPDATE|DELETE ... RETURNING colsReturns rows affected by an INSERT, UPDATE or DELETE, useful for reading generated keys and triggers.
Returns: ResultSet