Neon icon

Neon

Connect to Neon database and perform operations

Row → Select

AI-generated

Summary

Select rows from a configured table with optional filtering, sorting, and output options.

Inputs

  • schema (required) — The database schema to use, either selected from a list or entered as a name.
  • table (required) — The table to query, either selected from a list or entered as a name.
  • returnAll — If true, all matching rows are returned; otherwise results are limited by the limit parameter.
  • limit — Maximum number of rows to return when returnAll is false; must be at least 1.
  • where — Fixed collection of condition objects, each specifying a column, operator, and value to filter rows.
  • sort — Fixed collection of sort rules, each defining a column and direction (ASC/DESC).
  • combineConditions — Logic for combining multiple where conditions, either AND (all must match) or OR (any can match).
  • options — Execution options such as output columns, query mode, large-number handling, and conflict behavior.

Output shape

a list of selected rows

Rows are returned according to the chosen outputColumns; the list may be empty if no rows satisfy the conditions.

Examples

Example 1: Retrieve all rows from the public.users table.

schema=public, table=users, returnAll=true

Example 2: Filter users older than 25 and return up to 10 results.

where[0].column=age, where[0].condition=>, where[0].value=25, limit=10, returnAll=false

Example 3: Sort users by creation date descending and select specific output columns.

sort[0].column=created_at, sort[0].direction=DESC, options.outputColumns=["id","email","created_at"]

Discussion