May 2018
Intermediate to advanced
392 pages
10h 22m
English

So far, you’ve learned how to add a handful of rows to a table using SQL INSERT statements. A row-by-row insert is useful for making quick test tables or adding a few rows to an existing table. But it’s more likely you’ll need to load hundreds, thousands, or even millions of rows, and no one wants to write separate INSERT statements in those situations. Fortunately, you don’t have to.
If your data exists in a delimited text file (with one table row per line of text and each column value separated by a comma or other character) PostgreSQL can import the data in bulk via its COPY command. This command is a PostgreSQL-specific ...