Importando arquivo csv para o MySQL:
LOAD DATA LOCAL INFILE 'arquivo.csv'
INTO TABLE tabela
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '/r/n'
(campo1, campo2,...., campo n)
Exportando tabela do MySQL pra csv:
SELECT campo1, campo2, ...., campo n FROM tabela
INTO OUTFILE '/temp/arquivo.csv'
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '/r/n';
Nenhum comentário:
Postar um comentário