|
|
Insert file data into DB table - Mysql
|
Views : 764
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
We can load a list of file data into table by using bellow query
mysql>load data local infile "filename.txt" into table table_name;//location of "D://Program Files/MySQLMySQL Server 5.0/bin/filename.txt"
Example:
Consider a text document
name1 address1
name2 address2
name3 address3
name4 address4
name5 address5
name6 address6
|
Now we have to add the data in text file to table.
mysql>create table data(name varchar(20),address varchar(100));
mysql>load data local infile "filename.txt" into table data; |
|
By - Vinoth, On - 2009-02-09 |
|
|
|