# SQL

### Description

The `SQL` action executes one or more SQL scripts from this action’s configuration or from a file.

You can execute more than one SQL statement, as long as they are separated by semi-colons.

The SQL workflow action is flexible; you can perform procedure calls, create and analyze tables, and more.

Common uses associated with the SQL workflow action include truncating tables, drop index, partition loading, refreshing materialized views, disabling constraints, disabling statistics, and so on..

### Options

| Option                        | Description                                                                                                                                                                                   |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Action name                   | The name of the workflow action.                                                                                                                                                              |
| Database Connection           | The database connection to use.                                                                                                                                                               |
| SQL from file                 | Enable this option to load the SQL statement from a file given by the SQL filename                                                                                                            |
| SQL filename                  | The filename for the file with SQL statements.                                                                                                                                                |
| Send SQL as single statement? | Enable this option to not separate the statement by semicolons. This is often useful when a script is given or multiple statements should be processed and committed as one single statement. |
| Use variable substitution?    | Enables variables to be used in the SQL Script.                                                                                                                                               |
| SQL script                    | The SQL script to execute. Multiple statements can be separated by semicolons.                                                                                                                |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/sql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
