How to export the resulting data in PostgreSQL to .CSV?

后端 未结 3 1825
离开以前
离开以前 2020-12-16 23:40

I use PostgreSQL 9.4.1

My query:

copy(select * from city) to \'C:\\\\temp\\\\city.csv\'
copy(select * from city) to E\'C:\\\\temp\\\\city.csv\'
         


        
3条回答
  •  悲哀的现实
    2020-12-17 00:05

    I am using pgAdmin v1.5 . The first query is

    select table_name from information_schema.tables where table_catalog = 'ofbiz' order by table_name
    

    Then I press button download, pgAdmin will return a csv file, is result set of first query.

提交回复
热议问题