---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/execute.md
cuppy_section: docs
cuppy_doc: 25Z6-20JP
cuppy_doc_uuid: aaa8ea9e-c8bf-413f-b759-34bb4d365305
cuppy_permalink: https://cuppy.io/salesforce/d/25Z6-20JP
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/execute
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: b1063edd602fb6ff33fcd4715d361e54c06c20c9486ada8d9ed91d1d8b997d60
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/execute.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## EXECUTE

**Applies to:** ❌ Data 360 SQL ✅ Tableau Hyper API

Execute a prepared statement.

`EXECUTE` is used to execute a previously prepared statement. Since prepared statements only exist for the duration of a session, the prepared statement must have been created by a [`PREPARE`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/prepare.html) statement executed earlier in the current session.

If the `PREPARE` statement that created the statement specified some parameters, a compatible set of parameters must be passed to the `EXECUTE` statement, or else an error is raised. Note that (unlike functions) prepared statements are not overloaded based on the type or number of their parameters; the name of a prepared statement must be unique within a database session.

For more information on the creation and usage of prepared statements, see [PREPARE](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/prepare.html).

`<name>`
The name of the prepared statement to execute.

`<parameter>`
The actual value of a parameter to the prepared statement. This must be an expression yielding a value that is compatible with the data type of this parameter, as was determined when the prepared statement was created.

Examples are given in the [Examples](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/prepare.html#examples) section of the [PREPARE](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/prepare.html) statement.

The SQL standard includes an `EXECUTE` statement, but it is only for use in embedded SQL. This version of the `EXECUTE` statement also uses a somewhat different syntax, derived from PostgreSQL.


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
