如何將表格導出爲帶有PostgreSQL標題的CSV文件? - How to export table as CSV with headings on Postgresql?

問題:

I'm trying to export a PostgreSQL table with headings to a CSV file via command line, however I get it to export to CSV file, but without headings.我正在嘗試通過命令行將帶有標題的PostgreSQL表導出到CSV文件,但是我將其導出到CSV文件,但是沒有標題。

My code looks as follows:我的代碼如下所示:

COPY products_273 to '/tmp/products_199.csv' delimiters',';

解決方案:

參考一: https://en.stackoom.com/question/4hOH
參考二: https://stackoom.com/question/4hOH
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章