Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How do I import a CSV file into postgres and make it skip the first line (it's just column titles).
I try:
\COPY products(sight, department) from 'coy.csv' with (FORMAT CSV);
添加 HEADER 行将说明第一行是列标题。
COPY products (sight,department) FROM 'coy.csv' CSV HEADER;
http://www.postgresql.org/docs/current/static/sql-copy.html