0

My table has around 190 fields. Out of which only 30 cannot be null. And around 7k rows are to be inserted.

I am using JDBC. Is there anyway of inputting all these directly from a text file in a single INSERT instead of doing an INSERT statement 7k times.

1
  • maybe you can use import in MySQL check this out cyberciti.biz/faq/… Commented Feb 23, 2013 at 9:53

1 Answer 1

1

If you want to write a query itself, you can use LOAD DATA INFILE. It is a very fast method of importing a file. However, the file has to be properly formatted.

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.