SELECT into outfile backup database data select email into outfile "test.txt" from email; select substring (boss,), addr from guest; load data [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE "/opt/abc.txt" into table table_name -www.2cto.com-fields terminated by ',' (column1, column2, colum3 ); mysql> SELECT * FROM table1 into outfile 'data.txt 'fields terminated by', 'From... to read the files separated by commas, the correct statement is: mysql> load d. Ata infile 'data.txt 'into table table2 fields terminated by', '; -www.2cto.com-if you try to read the file using the statement shown below, it will not work, the command load data infile is used to find the location between FIELDS: mysql> load data infile 'data.txt 'into table table2 fields terminated by' \ T '; the possible result is that each input row is interpreted as a single field. Load data infile can be used to read files obtained from external sources. For example, a file in dBASE format will have fields separated by commas and enclosed by double quotation marks. If the row in the file is terminated by a line break, the following command shows the FIELDS and row processing options you will use to LOAD the file: mysql> load data infile 'data.txt 'into TABLE tbl_name fields terminated ', 'enabledby' "'Lines terminated by '\ n'; -www.2cto.com-any field or row processing option can specify an empty string (''). If it is not null, the value of FIELDS [OPTIONALLY] enclosed by and fields escaped by must be a single character. Fields terminated by and lines terminated by values can be over one character. For example, write a line terminated by the carriage return or read a file containing such a line and specify a line terminated by '\ r \ n' clause. -Www.2cto.com-FIELDS [OPTIONALLY] enclosed by control field surrounded BY characters. For output (SELECT... into outfile), if OPTIONALLY is omitted, all fields are surrounded by enclosed by characters. An example of such output (using a comma as the field separator) is shown below: "1", "a string", "100.20" "2 ", "a string containing a, comma", "102.20" "3", "a string containing a \" quote "," 102.20 "" 4 ", "a string containing a \", quote and comma "," 102.20 "======================= insert into tabl (id, email) select id, email from guest; author huimai