load text data into table : Load Data Into Table « Backup Load « SQL / MySQL






load text data into table

 
LOAD DATA INFILE '/textFileName.txt'
INTO TABLE quackers
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;

/*
      Colons, by using ':'

      Semicolons, by using ';'

      Spaces, by using ' '

*/
           
         
  








Related examples in the same category

1.Load data in txt file into database
2.Set division with
3.Line starting string
4.Importing CSV Files
5.Specifying the Datafile Format
6.To specify a file format explicitly, use a FIELDS clause to describe the characteristics of fields within a line
7.IGNORE is often useful with files generated by external sources.
8.Skipping Datafile Lines
9.Specifying the Location of Files on the Client Host
10.The syntax for a command to use a comma-separated text file, saved in a Windows format
11.IGNORE lines.
12.If you are using a Linux system, replace the '\r\n' in the LINES TERMINATED BY syntax command with just '\n'.