I have a database named mydb
There is table named mytable
the columns of the mytable are "a","b","c","d"
I want to insert the values into these a,b,c,d columns of mytable from a file myfile.txt which has data in the same order as that of the mytable.
Is there an easy way to insert values in to the table from the file without using any loop?
edited Part
The table already has large amount of data in it and I don’t want to perturb it.
Instead of just loading data , I want to simply insert the values into the table and also I don’t want to do it one by one but in one command without using a loop.
#
Thanks.
try LOAD DATA INFILE
See MYSQL Documentation