Database → Execute Query
AI-generatedSummary
Executes raw SQL queries against an openGauss database using parameterized placeholders.
Inputs
- query (required) — The SQL query to execute. Use $1, $2, $3, etc to refer to the 'Query Parameters' set in options below.
- options.queryReplacement — Comma-separated list of values to use as query parameters ($1, $2, ...). Can be a comma-separated string, a JSON array, or a single value.
Output shape
One item per returned row (success envelope for queries with no results).
Returns an empty item with { success: true } if the query returns no rows. If 'Continue on Error' is enabled, errors are returned as items with an 'error' field.
Examples
Example 1: Select data with parameters
Query: SELECT * FROM products WHERE price > $1 AND stock < $2; Query Parameters: 50, 10
Example 2: Insert or update data
Query: INSERT INTO orders (id, customer_id) VALUES ($1, $2) ON CONFLICT (id) DO UPDATE SET customer_id = $2; Query Parameters: 123, 99