---
description: performs a database query
---

# Database Query Executor

<img src="https://processmix.com/wp-content/uploads/2023/01/Property-1Connector_DB.png" alt="" data-size="line"> The Database Query Executor node is a versatile database utility designed to execute SQL queries against a specified database. It facilitates interaction with the database by sending queries and retrieving results. This function is typically used in applications that require database connectivity for data retrieval, manipulation, or storage.

***

## Properties

### Common

<mark style="color:purple;">**Name**</mark> - refers to the unique identifier or label assigned to a node within a flow.

<table><thead><tr><th width="139">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td>input Text</td><td><ul><li>must consist of letters (A-Z or a-z), digits (0-9), underscores (_), or dollar signs ($). However, a class name cannot start with a digit and dollar sign ($)</li><li>Unique per flow</li><li>Mandatory</li><li>Min length: 1</li><li>Max length: 255</li><li><a href="../../../appendix/reserved-words">Reserved words</a></li></ul></td></tr></tbody></table>

<mark style="color:purple;">**Description**</mark> - provides a textual description or additional information about a  node within a flow. Unlike the name property, which serves as a unique identifier or label for the node, the description property offers supplementary details that help to clarify the purpose, functionality, or behavior of the node.

<table><thead><tr><th width="144">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td>Input Text</td><td><ul><li>Max length: 5000</li></ul></td></tr></tbody></table>

### Specific

<mark style="color:purple;">**Query**</mark> - query to be executed. You can select any query from the project or its [dependencies](../../../dependencies).

<table><thead><tr><th width="211">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td><a href="../../../../connectors/db-connector#queries">Database connector query reference</a></td><td><ul><li>Mandatory</li></ul></td></tr></tbody></table>

<mark style="color:purple;">**SQL**</mark> - this property appears in the case where the selected query is [dynamic](../../../connectors/db-connector/dynamic-query).

<table><thead><tr><th width="213">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td>String <a href="../../expressions">Expression</a></td><td><ul><li>Mandatory</li></ul></td></tr></tbody></table>

<mark style="color:purple;">**Query parameters**</mark> - [parameters](../../../../connectors/db-connector/prepared-query#input-parameters) defined for the selected query.

<table><thead><tr><th width="211">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td><a href="../../expressions">Expression</a> (type depends on the definition)</td><td><ul><li>Mandatory</li></ul></td></tr></tbody></table>

### Optional

<mark style="color:purple;">**Transaction**</mark> - a reference to the transaction initiated by the [BeginTransaction](database-begin-transaction) node, to be used for query execution.

{% hint style="info" %}
You can find more information about database transactions in the [appendix section](../../../appendix/database-transaction).
{% endhint %}

***

## Result

A new [node variable](../../variables/node-variables) with type [pdk.sql.QueryResult](../../../../structures/pdk.sql#queryresult) has been added to the flow's scope.

***

## Connections

| Type | Min count | Max count |
| ---- | --------- | --------- |
| in   | 1         | \*        |
| out  | 1         | 1         |

