MySQL Forums
Forum List  »  Spanish

Re: Importar datos desde CSV o Excel en MySQL
Posted by: Jaime Crespo
Date: November 30, 2009 04:07PM

Por favor, ¿¡usar phpmyadmin!?
Un simple comando MySQL es suficiente:

LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\n';
(la sintaxis puede variar ligeramente, ej: OPTIONALLY ENCLOSED BY)

o bien utilizar la utilidad cliente mysqlimport.

¡Si hasta existe el motor CSV, con lo que no haría falta convertir el archivo!
Disclaimer: no he visto nunca a nadie usar este motor en producción.

--
Jaime Crespo
http://dbahire.com

Options: ReplyQuote


Subject
Views
Written By
Posted
...
1588
November 27, 2009 08:17AM
Re: Importar datos desde CSV o Excel en MySQL
30319
November 30, 2009 04:07PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.