I had to import the list of the students of my school into Postgresql, so I converted xlsx files to a csv file and imported into psql.
Log in DB and type the follwing line:
|
|
\copy
is client-side command. Lots of posts were told me to use COPY
command, but the COPY
command brought file access permission denied error.
students
which is next to \copy
is a table name. You may specify columns in a csv file like the example command. There were 4 columns that I wrote in the csv file: grade, class, number, name
.