Actions6
- Database Actions
Database → Select
AI-generatedSummary
Select rows from a MySQL database table with optional filtering, limits, sorting, and output options.
Inputs
- table (required) — The database table to query; can be chosen from a list of available tables or entered as a name.
- returnAll — Whether to return all matching rows without a limit; when false, the Limit parameter controls the maximum number of rows returned.
- limit — Maximum number of rows to return when Return All is disabled; must be a positive integer.
- where — An array of condition objects, each specifying a column, an operator (e.g., Equal, Like), and an optional value to filter rows.
- combineConditions — Logical operator (AND or OR) that defines how multiple conditions in where are combined.
- sort — An array of sort rule objects, each defining a column and direction (ASC or DESC) for ordering the result set.
- options — Various query‑level settings such as connection timeout, batching mode, output column selection, handling of large numbers, decimal output format, and conflict handling.
Output shape
a list of selected rows
The result may be empty; when Return All is false only up to limit rows are returned; detailedOutput can provide query details in the output.
Examples
Example 1: Fetch the first 10 active users from the users table, sorted by created_at descending.
Table: users, Limit: 10, Return All: false, where: [{column: "status", condition: "Equal", value: "active"}], combineConditions: "AND", sort: [{column: "created_at", direction: "DESC"}], options: {"queryBatching": "single"}
Example 2: Retrieve all matching products where price is greater than 100.
Table: products, Return All: true, where: [{column: "price", condition: "Greater Than", value: "100"}], combineConditions: "AND", options: {"outputColumns": ["id","name","price"]}
Example 3: Execute a select query with detailed debug output for recent orders.
Table: orders, Return All: false, Limit: 5, where: [{column: "order_date", condition: "Greater Than Or Equal", value: "2024-01-01"}], combineConditions: "AND", options: {"detailedOutput": true, "queryReplacement": "1,2,3"}