Reference: Copy Statement
Copy statements allow bulk im- and export of tables:
Usage example:
-- Export
copy (select * from movies) to 'movies_backup.csv';
-- Import
copy movies2 from 'movies_backup.csv';Options
Copy supports a number of options controlling the format.
Format:csv,text,binary. Only for copy to:numpy.Delimiter:
The record separator fortextandcsvformats. By default\t, and,.Header:
If thetextandcsvhas a header. By defaultfalse.Null:
The string that represents anullvalue intextandcsvformats. By default\N, and empty string.Quote:
The quoting character for thecsvformat. By default". This can be used to insert values containing the delimiter.Escape:
The escape character for thecsvformat. By default". This can be used to escape the quote character.