Interview QuestionsCategory: MySQLImport CSV file data in mysql database table
bestonetechnologies Staff asked 4 months ago

How to import CSV file data in MySql database table?

1 Answers
Best Answer
bestonetechnologies Staff answered 4 months ago

1. Open the command prompt
2. Go to mysql folder ( C:\xampp\mysql\bin>mysql -u root -p )
3. Select database by command: >use database_name
4. Run the below command:
-> load data
-> infile ‘D:/folder/filename.csv’
-> into table table_name fields terminated by ‘,’
-> enclosed by ‘”‘ lines terminated by ‘\n’;

Your Answer

9 + 20 =