---
title: "Execute SQL query"
method: POST
path: "/base/{baseId}/sql-query"
tags: ["base"]
---

# Execute SQL query

`POST /base/{baseId}/sql-query`

Execute SQL query on a base

## Path parameters

- `baseId` string, required — The base ID to execute query on

## Request body

- object
  - `sql` string, required — The SQL query to execute

## Response `200`

Query executed successfully

- object
  - `rows` object[], required — The query result rows

---

[API](https://skmtc.net/teable/apis/teable-app.md) · [All operations](https://skmtc.net/teable/apis/teable-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/teable/teable-app/revisions/7515f3b33d79/schema)
