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 are mysql data types?
What is the difference between primary key and candidate key?
What mysql -u john -p command does?
what is the querry for all managers salary?
Where’s database data actually stored?
What is the difference between unix timestamps and mysql timestamps?
What is a join in mysql?
What is dbms in mysql?
What is a csv table?
For the database from the previous question, please give an SQL query which returns the invoice number of all invoices which contain the article with the number ?1234?. The query should be able to run under a MySQL 4.0 database.
What tools available for managing mysql server?
How do I transfer data from one database to another in mysql?