# Editor Basics

## **Open SQL Query Editor**

To open the query editor, click on the query editor button on top of the left panel, or use the shortcut key **`⌘ + Return`**, or **`⌘ + E`**.

## **Execute queries**

To execute a query from the Query Editor, select the query and click on the Run Current button, or use shortcut key **`⌘ + Return`**.

TablePlus also supports writing and executing multiple queries, you’ll need to separate them with a semicolon.

To execute multiple queries, select them in the Query Editor and click on the dropdown next to Run Current button, choose Run All, or use the shortcut key **`⌘ + ⇧ + Return`**.

You can change the default Execute button from Run Current to Run All from the same dropdown.

![](https://2743975646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LriZ7WXXZykpg6_MQsw%2F-LrtPWhRjnq2UrVm2JPH%2F-LrtUcUSF0cHchexAfML%2Fexecute%20queries.gif?alt=media\&token=2a13ea60-a430-4e94-9843-7871197e4d21)

## **Cancel Queries**

When executing a long running queries and you need to stop it midway through,  you can do it via the process list:

* Click **`Cancel`** button on the Query Editor
* Or navigate to menu **`Connection`** > **`Process List...`**
* Or use the shortcut keys **`⌘ + .`**&#x20;

From the Process List, you can see all the running queries, select the query and click Kill to cancel it.

![](https://2743975646-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LriZ7WXXZykpg6_MQsw%2F-LsXlpcCG3iP828SwAdi%2F-LsXnQQKbT2RjfWbamNL%2Fcancel-queries.gif?alt=media\&token=6481fe09-a7e4-4601-babc-50d2e329abf8)

## **Export queries**

To export a queries from the Query Editor, click on the dropdown menu next the the Run button and choose **`Save SQL as...`**


---

# 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.tableplus.com/query-editor/untitled.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.
