The load data infile statement reads a table from a text file at a high speed. If you specify the local keyword, read the file from the client host. If local is not specified, the file must be on the server. (Local is available in MySQL 3.22.6 or a
The LOAD DATA infile statement reads from a text file into a table at a high speed. If you specify the local keyword, read the file from the client host. If local is not specified, the file must be located on the server. (Local is available in MySQL3
Http://blog.csdn.net/adparking/article/details/7098221
Load data [low_priority] [local] infile 'file_name.txt '[Replace | ignore]
Into Table tbl_name[Fields[Terminated by '\ T'][Optionally] enclosed by ''][Escaped by '\'][Lines terminated by '\
Mysql import data load data infile usage, mysqlinfile
Mysql import data load data infile usageBasic Syntax: load data [low_priority] [local] infile 'file _ name txt '[replace | ignore]
Into table tbl_name
[Fields
[Terminated by 'T']
[OPTIONALLY]
Today, we tested JDBC Connection to use Load Data InFile to import Data to the Data table. The Java program is as follows:
Public class LoadDataTest {@ Test public void test_loadData () throws Exception {Connection conn = null; Statement stmt = null;
Use load data Infile in mysql, mysqlinfileThe speed is 20 times faster than insert. Share java program operations.
package com.mysql.csv;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import
+++++++++++++++++++++++++++++++++++++++++++++mysqlimpoRt++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++In fact, if using Mysqlimport is a command-line program provided by MySQL database, in essence, j Load Data infile command interface,
1.LOAD DATA INFILE is used to write the contents of a text file to the MySQL table at high speed , and SELECT ... the action of into FILE is corresponding, an import, an export. Use LOAD DATA INFILE requires MySQL Read access to the file to be
Load data infile "C:/users/administrator/desktop/1.txt"into table to have an existing table nameFields are separated by tabs by defaultFileI love you. 20 looks normalLi Kui 21 appearance 1 usualWang Yimi 210 appearance 3 usualOld 324 is strong.Old
If you want to import Chinese data, the utf8 Character Set set in mysql will save the UTF-8 character set for the xxx.txt file you want to import. The command load data infile "d: /Websites/Sxxxx/test1.txt "ignore into table 'names' fields
We often import data! MySQL has an efficient import method, which is the load data infile below to see the case descriptionBasic syntax: load data [low_priority] [local] infile " " [replace | Ignore]into Table tbl_name[fields[terminated by " t
The LOAD DATA infile statement reads from a text file into a table at a high speed.1. Basic grammarLOAD DATA [Low_priority | CONCURRENT] [LOCAL] INFILE ' file_name.txt ' [REPLACE | IGNORE] into TABLE tbl_name [Fields [TERMINATED by '
If you are importing the Chinese data, my MySQL set UTF8 character set, so you want to import the Xxx.txt file to save the Utf-8 character set, command load Data infile "D:/websites/sxxxx/test1.txt" Ignore into table ' names ' fields terminated by ',
[MySQL practice] when loading data infile reports ERROR 1148 (42000) or ERROR 1045 (28000, load data infile is a very efficient command, from db1.table1 of host1 Through select... into outfile: import data to a text file, and then import data to db2.
Http://blog.chinaunix.net/u/29134/showart_1069838.html
My articles are generally easy to understand and won't be so in-depth that it is hard for everyone to understand. (In fact, I am not at the same level)
Load data infile has always been
First create a table
Use Test;
Create Table Tabletest (
' ID ' Mediumint (8) Default ' 0 ',
' Name ' varchar default '
) Type=myisam;
Import data to a datasheet
Load Data InFile ' c:/data.txt ' into Table ' tabletest '
Commonly used as
Use LOAD Statement Bulk Data EntryGrammar:LOADDATA[low_priority | CONCURRENT] [LOCAL]INFILE'file_name' [REPLACE | IGNORE] into TABLETbl_name[CHARACTER SET charset_name] [{fields | COLUMNS} [TERMINATED by ' string ']
MySQL load data infile parsing, mysqlinfile
Load data [LOW_PRIORITY] [LOCAL] INFILE'file_name.txt '[REPLACE | IGNORE]
Into table tbl_name[FIELDS[Terminated by '\ T'][OPTIONALLY] enclosed by ''][Escaped by '\'][Lines terminated by '\ n'][IGNORE
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.