EXECUTE

Synopsis

EXECUTE statement_name [ USING parameter1 [ , parameter2, ... ] ]

Description

Executes a prepared statement with the name statement_name. Parameter values are defined in the USING clause.

Examples

Prepare and execute a query with no parameters:

PREPARE my_select1 FROM
SELECT name FROM nation;
EXECUTE my_select1;

Prepare and execute a query with two parameters:

PREPARE my_select2 FROM
SELECT name FROM nation WHERE regionkey = ? and nationkey < ?;
EXECUTE my_select2 USING 1, 3;

This is equivalent to:

SELECT name FROM nation WHERE regionkey = 1 AND nationkey < 3;

See also

PREPARE

success-mail-img

You've joined our email list. Our newsletter will be delivered to your inbox every other week, with news from Peaka and the no-code world, as well as updates on the latest trends and developments in the data integration space!

success-mail-img

Thank you for your interest. We'll contact you soon.