On this page

COPY RESULT

Core command

Copies the last result, of a SQL query or a RUN, to the clipboard, ready to paste into a spreadsheet.

Syntax

COPY RESULT

Examples

SELECT * FROM CUSTOMER;
COPY RESULT;
RUN /api/customer/123;
COPY RESULT;

Details

Which result

The source is whichever ran last in the session: the last SQL query (the one / runs again) or the last RUN of an API endpoint. When neither has run yet, the command prints No query in memory.

  • A SQL query is run again to copy its result, since BroadSQL does not keep a result after the query ends. Its ${name} variables take their current values.
  • An API result is copied as DUMP API RESULT would export it.

Clipboard content

The text is the same table that DUMP ... AS TEXT writes to a file: tab separated, a NULL as an empty field, the same value formatting, and a value containing a tab, a quote or a line break in double quotes, so that pasting never shifts the columns. The clipboard is retried when another application briefly locks it; a session without a graphical desktop gets a clear error.

Used in these how-tos

Last modified in release 5.5.0.

Found something wrong or unclear on this page? , with the page address.