Export

functional

Send results onward in the format the next person or tool will actually appreciate.

One Export… command, from the grid menu or toolbar, opens a single dialog for any result set. Pick a format, choose Copy to clipboard or Save to file…, and you are done. Standard data formats and programming-language generators live together, and unused formats can be hidden in Settings › Results › Export.

SQLly
SQLly Export Results dialogSQLly Export Results dialog
The consolidated Export dialog: format list grouped into Standard and Programming, with clipboard/file destinations.
Shared export options - also under Settings › Results › Export, apply across formats: how NULL is written, how cell line breaks are handled, whether to include headers, optional gzip, and the batch filename pattern {schema}_{table}_{date}.{format}.
Very long values. The grid fetches a text or binary cell longer than 8 KiB as an 8 KiB preview (the full value is read on demand when you open it). Exports from the grid (this dialog, Copy as, Save Results and Open in Spreadsheet) write the rows the grid holds, so those cells are exported as their previews, and Messages says how many cells that affected. Exports that run the query themselves write every value whole: Export Tables… and Save Data As in the explorer, scheduled query exports, Export Database as SQL, data transfers, and sqlly query on the command line. Over a relay connection the same holds once the bridge runs this version; an older bridge sends every cell whole, so the grid has no previews to report and a single row larger than 16 MiB fails the query.
Very large results. A result too large to hold in memory is kept on disk. Exporting or copying it reads its first 100,000 rows from disk in the background (a note above the grid says what is being read), then finishes the export; Messages says when rows past that point were left out. Snapshots, the Profile pane, Transpose and moving the tab to another window read it the same way.

Every example below exports this small two-row result set:

SELECT id, customer, amount, created FROM orders;
-- id | customer | amount  | created
--  1 | Acme     | 1250.00 | 2026-09-01
--  2 | Globex   |  890.50 | 2026-09-02

Standard formats

CSV .csv

Comma-separated, RFC-style quoting. An Excel-compatible variant adds a UTF-8 BOM.

id,customer,amount,created
1,Acme,1250.00,2026-09-01
2,Globex,890.50,2026-09-02

TSV .tsv

Tab-separated - paste-friendly into spreadsheets.

id	customer	amount	created
1	Acme	1250.00	2026-09-01
2	Globex	890.50	2026-09-02

JSON .json

An array of objects, one per row.

[
  { "id": 1, "customer": "Acme", "amount": 1250.00, "created": "2026-09-01" },
  { "id": 2, "customer": "Globex", "amount": 890.50, "created": "2026-09-02" }
]

JSON Lines .jsonl

One JSON object per line, ideal for streaming and log pipelines.

{"id":1,"customer":"Acme","amount":1250.00,"created":"2026-09-01"}
{"id":2,"customer":"Globex","amount":890.50,"created":"2026-09-02"}

Markdown .md

A pipe table with a separator row; pipes inside cells are escaped.

| id | customer | amount  | created    |
| -- | -------- | ------- | ---------- |
| 1  | Acme     | 1250.00 | 2026-09-01 |
| 2  | Globex   | 890.50  | 2026-09-02 |

HTML .html

A standalone <table>.

<table>
  <thead><tr><th>id</th><th>customer</th><th>amount</th><th>created</th></tr></thead>
  <tbody>
    <tr><td>1</td><td>Acme</td><td>1250.00</td><td>2026-09-01</td></tr>
    <tr><td>2</td><td>Globex</td><td>890.50</td><td>2026-09-02</td></tr>
  </tbody>
</table>

XML .xml

A row-per-element document.

<rows>
  <row>
    <id>1</id>
    <customer>Acme</customer>
    <amount>1250.00</amount>
    <created>2026-09-01</created>
  </row>
  <row>
    <id>2</id>
    <customer>Globex</customer>
    <amount>890.50</amount>
    <created>2026-09-02</created>
  </row>
</rows>

INSERT .sql

INSERT statements, quoted for your connection's dialect ([brackets] on SQL Server, backticks on MySQL and ClickHouse, double quotes on PostgreSQL, SQLite, DuckDB and Oracle), with literals rendered the way that engine wants them.

INSERT INTO orders (id, customer, amount, created) VALUES
  (1, 'Acme', 1250.00, '2026-09-01'),
  (2, 'Globex', 890.50, '2026-09-02');

Temp Table .sql

A CREATE for a temp table plus the inserts - a self-contained snapshot you can paste into another session. Dialect-aware.

CREATE TABLE #orders (
  id        INT,
  customer  NVARCHAR(4000),
  amount    DECIMAL(18,2),
  created   DATE
);
INSERT INTO #orders (id, customer, amount, created) VALUES
  (1, 'Acme', 1250.00, '2026-09-01'),
  (2, 'Globex', 890.50, '2026-09-02');

SQL Values .sql

A bare VALUES list to drop into a CTE or IN clause. Dialect-aware.

VALUES
  (1, 'Acme', 1250.00, '2026-09-01'),
  (2, 'Globex', 890.50, '2026-09-02')

Excel (XLSX) .xlsx

A real .xlsx workbook, a formatted Excel table with banded rows and an auto-filter header. It keeps the grid as you see it: column order, widths, hidden and frozen columns, number and date formats, and conditional formatting. Computed columns become live Excel formulas, and a configured pivot gets a second sheet. Because it's binary, this format saves to a file (clipboard is disabled for it). The details are on Excel export.

SQLLY Export .sqllyexport

SQLly's own envelope format - carries the rows plus their column types and metadata for lossless round-tripping back into SQLly.

Programming formats

These generators emit ready-to-paste source code that embeds the result rows as data, handy for fixtures, seed data, and quick scripts. One example per language:

C# .cs

var rows = new[]
{
    new { Id = 1, Customer = "Acme", Amount = 1250.00m, Created = "2026-09-01" },
    new { Id = 2, Customer = "Globex", Amount = 890.50m, Created = "2026-09-02" },
};

Python .py

rows = [
    {"id": 1, "customer": "Acme", "amount": 1250.00, "created": "2026-09-01"},
    {"id": 2, "customer": "Globex", "amount": 890.50, "created": "2026-09-02"},
]

Rust .rs

struct Order { id: i64, customer: &'static str, amount: f64, created: &'static str }

let rows = vec![
    Order { id: 1, customer: "Acme", amount: 1250.00, created: "2026-09-01" },
    Order { id: 2, customer: "Globex", amount: 890.50, created: "2026-09-02" },
];

JavaScript .js

const rows = [
  { id: 1, customer: "Acme", amount: 1250.00, created: "2026-09-01" },
  { id: 2, customer: "Globex", amount: 890.50, created: "2026-09-02" },
];

TypeScript .ts

interface Order { id: number; customer: string; amount: number; created: string; }

const rows: Order[] = [
  { id: 1, customer: "Acme", amount: 1250.00, created: "2026-09-01" },
  { id: 2, customer: "Globex", amount: 890.50, created: "2026-09-02" },
];

Kotlin .kt

data class Order(val id: Int, val customer: String, val amount: Double, val created: String)

val rows = listOf(
    Order(1, "Acme", 1250.00, "2026-09-01"),
    Order(2, "Globex", 890.50, "2026-09-02"),
)

Swift .swift

struct Order { let id: Int; let customer: String; let amount: Double; let created: String }

let rows = [
    Order(id: 1, customer: "Acme", amount: 1250.00, created: "2026-09-01"),
    Order(id: 2, customer: "Globex", amount: 890.50, created: "2026-09-02"),
]

Java .java

record Order(int id, String customer, double amount, String created) {}

List<Order> rows = List.of(
    new Order(1, "Acme", 1250.00, "2026-09-01"),
    new Order(2, "Globex", 890.50, "2026-09-02")
);

Go .go

type Order struct {
    ID       int
    Customer string
    Amount   float64
    Created  string
}

rows := []Order{
    {1, "Acme", 1250.00, "2026-09-01"},
    {2, "Globex", 890.50, "2026-09-02"},
}

PHP .php

$rows = [
    ['id' => 1, 'customer' => 'Acme', 'amount' => 1250.00, 'created' => '2026-09-01'],
    ['id' => 2, 'customer' => 'Globex', 'amount' => 890.50, 'created' => '2026-09-02'],
];

C++ .cpp

struct Order { int id; std::string customer; double amount; std::string created; };

std::vector<Order> rows = {
    {1, "Acme", 1250.00, "2026-09-01"},
    {2, "Globex", 890.50, "2026-09-02"},
};

The exact field names, types, and value quoting follow the result's columns and your connection's dialect, the samples above are representative. Any format you don't use can be hidden under Settings › Results › Export.