if we want to load data from a text file into a mysql table,
but the columns in table are 1st: code(int) and 2nd:
city(varchar), but in text file the format is 1st cityname
and then code separeted by delimeters. how to load?
Answers were Sorted based on User's Feedback
Answer / vijay singh
LOAD DATA INFILE 'data.txt' INTO TABLE table2
FIELDS TERMINATED BY ',';
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vipul dalwala
LOAD DATA INFILE 'data.txt' INTO TABLE table_name
(city,code);
Is This Answer Correct ? | 0 Yes | 0 No |
What is striped backup
How do I install mysql?
What is mysql port?
How to store binary data in mysql?
How to analyze tables with 'mysqlcheck'?
How would concatenate strings in mysql?
What are mysql queries?
What does mysql_fetch_assoc do?
Can't connect mysql server on localhost?
How do I use mysql?
What is the purpose of mysql database?
Give the syntax of GRANT commands?