Re: How to export query results to excel file using psql command in postgresql - Mailing list pgsql-general

From Paul Förster
Subject Re: How to export query results to excel file using psql command in postgresql
Date
Msg-id DB4C59C6-9FF6-48F9-B82E-12316D8E9B2B@gmail.com
Whole thread Raw
In response to How to export query results to excel file using psql command in postgresql  (Naveen Kumar <naveenmcp@gmail.com>)
List pgsql-general
Hi Naveen,

> On 13. Aug, 2020, at 16:10, Naveen Kumar <naveenmcp@gmail.com> wrote:
>
> How to export query results to excel file using psql command in postgresql

use the "copy" command along with its CSV output setting. Then open the CSV file with Excel.

Look here:

https://www.postgresqltutorial.com/export-postgresql-table-to-csv-file/

https://www.postgresql.org/docs/current/sql-copy.html

Cheers,
Paul


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How to export query results to excel file using psql command in postgresql
Next
From: Adrian Klaver
Date:
Subject: Re: How to export query results to excel file using psql command in postgresql