⌘+k ctrl+k
0.8
Search Shortcut cmd + k | ctrl + k
JSON Export

How to export a table to a JSON file

To export the data from a table to a JSON file, use the COPY statement.

COPY tbl TO 'output.json';

The result of queries can also be directly exported to a JSON file.

COPY (SELECT * FROM tbl) TO 'output.json';

For additional options, see the COPY statement documentation.