\copy (your query) to 'file path' csv header;
Example
\copy (select * from versions where item_type = 'User'%) to '/home/my_sql_query_result.csv' csv header;
No comments:
Post a Comment