> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL Editor

> Write and run SQL queries against your connected databases.

The SQL editor lets you write, execute, and save SQL queries directly in VexiData.

## Running a query

<Steps>
  <Step title="Select a database">
    Use the database dropdown in the toolbar to choose which connection to query.
  </Step>

  <Step title="Write your SQL">
    Type your query in the editor. The editor supports syntax highlighting and autocomplete for your table and column names.
  </Step>

  <Step title="Execute">
    Click **Run** or press `Ctrl+Enter` (`Cmd+Enter` on Mac).
  </Step>
</Steps>

Results appear below the editor with:

* **Row count** — Total number of rows returned
* **Execution time** — How long the query took in milliseconds
* **Data table** — Scrollable table with your results

NULL values are shown in italic. Long cell values are truncated — hover to see the full content.

## Saving queries

Click **Save** in the toolbar to save the current query for later use.

| Field           | Required | Description                                    |
| --------------- | -------- | ---------------------------------------------- |
| **Name**        | Yes      | A short name (e.g., "Active users this month") |
| **Description** | No       | What the query does                            |

Saved queries are tied to the database connection they were written for.

## Saved queries sidebar

Click the sidebar toggle to show your saved queries. Each entry shows:

* Query name and description
* How many times it's been executed
* When it was last run

Click a saved query to load it into the editor. Hover to reveal **Run** (execute immediately) and **Delete** actions.

## Keyboard shortcuts

| Shortcut     | Action                |
| ------------ | --------------------- |
| `Ctrl+Enter` | Run the current query |
