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

What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?

722


How do I quit mysql?

692


What is triggers and how it can be used in mysql?

727


What is a transaction? Describe mysql transaction properties.

795


How do you rename a table?

715


Why should I learn mysql?

706


Explain what is mysql?

826


How do I change the max connections in mysql?

654


What are date and time data types?

763


What does mysql flush hosts do?

672


How to represent ENUMs and SETs internally?

915


Can we store images in mysql database?

691


How do I start mysql in ubuntu?

717


How many columns can a table have?

690


Write a query to find duplicate rows in table?

704