---
title: "POST /v2/{+connection}:executeSqlQuery"
method: POST
path: "/v2/{+connection}:executeSqlQuery"
tags: ["projects"]
---

# POST /v2/{+connection}:executeSqlQuery

`POST /v2/{+connection}:executeSqlQuery`

Executes a SQL statement specified in the body of the request. An example of this SQL statement in the case of Salesforce connector would be 'select * from Account a, Order o where a.Id = o.AccountId'.

## Path parameters

- `connection` string, required

## Request body

- ExecuteSqlQueryRequest — An execute sql query request containing the query and the connection to execute it on.
  - `query` Query — A wrapper around the SQL query statement. This is needed so that the JSON representation of ExecuteSqlQueryRequest has the following format: `{"query":"select *"}`.
    - `queryParameters` QueryParameter[] — In the struct, the value corresponds to the value of query parameter and date type corresponds to the date type of the query parameter.
      - `value` unknown
      - `dataType` 'DATA_TYPE_UNSPECIFIED' | 'INT' | 'SMALLINT' | 'DOUBLE' | 'DATE' | 'DATETIME' | 'TIME' | 'STRING' | 'LONG' | 'BOOLEAN' | 'DECIMAL' | 'UUID' | 'BLOB' | 'BIT' | 'TINYINT' | 'INTEGER' | 'BIGINT' | 'FLOAT' | 'REAL' | 'NUMERIC' | 'CHAR' | 'VARCHAR' | 'LONGVARCHAR' | 'TIMESTAMP' | 'NCHAR' | 'NVARCHAR' | 'LONGNVARCHAR' | 'NULL' | 'OTHER' | 'JAVA_OBJECT' | 'DISTINCT' | 'STRUCT' | 'ARRAY' | 'CLOB' | 'REF' | 'DATALINK' | 'ROWID' | 'BINARY' | 'VARBINARY' | 'LONGVARBINARY' | 'NCLOB' | 'SQLXML' | 'REF_CURSOR' | 'TIME_WITH_TIMEZONE' | 'TIMESTAMP_WITH_TIMEZONE'
    - `timeout` string, int64 — Sets the number of seconds the driver will wait for a query to execute.
    - `query` string — Required. Sql query to execute.
    - `maxRows` string, int64 — Sets the limit for the maximum number of rows returned after the query execution.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/connectors.md) · [All operations](https://skmtc.dev/google/apis/connectors/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/connectors/revisions/1153921b6f7b/schema)
