Convert the PostgreSQL data table to excel and postgresqlexcel

Source: Internet
Author: User

Convert the PostgreSQL data table to excel and postgresqlexcel

COPYExchange data between PostgreSQL tables and standard file system files.COPYTOCopy all contents of a tableToOne file, whileCOPYFROMSlaveCopy data from a file to a table (attach the data to the existing content in the table ).

COPY table name TO 'file name .csv 'csv header;

Note: CSV

Open the comma-separated variable (CSV) mode.

HEADER

The Declaration file contains a header identification line that contains the name of each field in the file. When output, the first row contains the table field name. When input, the first row is ignored.


With file nameCOPYInstruct the PostgreSQL server to read and write data directly from the file. If the file name is declared, the file must be visible to the server, and the file name must be declared from the server's perspective. If the declaredSTDINOrSTDOUTData flows between the customer's front-end and server through connections.

Http://www.php100.com/manual/PostgreSQL8/sql-copy.html



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.