Skip to main content
The query editor is where you write and run queries against any connected database: SQL for PostgreSQL, MySQL, and SQLite; shell-style queries for MongoDB; and commands for Redis. Query editor

Open an editor

Click + in the tab bar and choose New Query, or use the query icon in the sidebar. The editor knows which connection and database the tab targets, shown in the footer.

Write with autocomplete

As you type, FlexTable suggests tables, columns, and keywords from the live schema. Autocomplete
Schema-aware. Suggestions come from the database you are actually connected to, so table names, column names, and types are real.

Format your SQL

Reformat a messy statement into clean, readable SQL with one action, so shared and saved queries stay tidy.

Run and read results

Press Cmd/Ctrl + Enter (or the Run button) to execute. Results stream into the grid below and large results paginate. The result grid is the same one used for table browsing, so you can sort, filter, and inspect a cell just like a table. Result grid with filter

Stop a running query

A long-running query can be stopped: the Run button becomes Stop while it executes. While the stop is in progress the editor shows Stopping query… (“Waiting for the database to answer. This can take a few seconds.”). FlexTable then tells you what actually happened, in the status bar and, when it matters, as a one-line strip in the result pane:
Re-running after a stop. When changes may already be saved, running the same query again first asks Run this query again? (“Running it again may apply the same changes twice.”). Choose Run anyway to go ahead or Cancel to check the data first.
The same outcomes apply when you stop a table load, an import or an export.

Saved queries and history

Saved queries in the Query Manager, organized into folders Two separate things:
  • Saved queries - name and save a query, organize saved queries into folders, and reopen them later. Save with Cmd/Ctrl + S or the Save action in the editor.
  • Run history - every query you run is logged automatically, separate from saved queries, with its status, duration, rows affected, and timestamp. Open the history view (grouped by date) to copy, re-run, or reopen a past query.

Visualize and export

  • Chart - switch the result from Table to Chart to see it as a bar, line, area, pie, or scatter chart. See Charts.
  • Export - save the result as CSV, JSON, SQL, or Excel. See Import and export.

Logs

The footer Logs tab shows execution details (timing and errors) for the queries you have run.