-2
load data infile 'D:\\diiet\\subir\\a.txt'
Into table reporte_dts_empresa_2015_sut CHARACTER SET latin1
fields terminated by '\t'

Why do I have to do this step?

LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;

I am new on sql, I'm trying to create a table whith excel data

i already done it, but im not sure how.

GMB
  • 216,147
  • 25
  • 84
  • 135

1 Answers1

2
LINES TERMINATED BY '\r\n'

This options tells MySQL that the lines in your input files are terminated with a sequence of carriage return and new line. This is important since different conventions exists for end of lines (notably, Windows and Linux differ).

IGNORE 1 LINES

With this option, the first line of input is skipped (MySQL will not attempt to inserted it in the table). This is typically useful if your file contains a header row.

You might want to have a look at the MySQL documentation of the LOAD DATA syntax.

GMB
  • 216,147
  • 25
  • 84
  • 135
  • 1
    Welcome @AndreaSilva! If my answer properly responded to your question, please accept it by clicking the green check sign... Thanks! – GMB Sep 20 '19 at 18:25