“Importar CSV a PostgreSQL” Código de respuesta

Ejecute el volcado PostgreSQL a CSV


        
            
        
     \copy (SELECT * FROM persons) to 'C:\tmp\persons_client.csv' with csv
Obedient Osprey

CSV en datos de datos

COPY table_name FROM 'C:\Users\Public\Documents\ert.txt' DELIMITER ',' CSV
-- make sure to put the file in public folder in windows 
-- Or temp folder in linux/mac 
-- because it might ask for some permissions...
Tall mouse

PostgreSQL Importar datos de CSV

copy table from '/home/usama/Documents/columns_rearrange.csv' csv header ;
Dull Duck

Importar CSV a PostgreSQL

COPY mytable FROM '/path/to/csv/file' WITH CSV HEADER; -- must be superuser
anmshuvo

Respuestas similares a “Importar CSV a PostgreSQL”

Preguntas similares a “Importar CSV a PostgreSQL”

Más respuestas relacionadas con “Importar CSV a PostgreSQL” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código