How to load data from a text file into a table?

Answer Posted / tushar

To load the text file pet.txt into the pet table, use this statement:

mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use mongodb instead of mysql?

488


What is the difference between BLOB AND TEXT?

590


Is oracle mysql free?

475


What is meant by mysqli?

500


Why do we use preparedstatement?

493






What are the other commands to know the structure of a table using mysql commands except explain command?

550


How do you login to MySql using Unix shell?

620


What are the 'mysql' command line arguments?

534


How do I optimize a selected query in mysql?

516


What is the default port of mysql server?

516


How to shut down the server with 'mysqladmin'?

545


Is mysql free software?

501


What you can use regular expression for in mysql? Support your answer with an example?

487


What is 'mysqlshow'?

638


Is there a free version of mysql?

481