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 |
How to show all tables with 'mysql'?
What is different between sql and mysql?
How can you do the fine tunning?
How do I free up space in mysql?
Explain the difference between delete and truncate.
List some comparisons operators used in mysql?
How to calculate expressions with sql statements?
Explain the difference between MyISAM Static and MyISAM Dynamic?
What is the storage engine for mysql?
How can we repair a MySQL table?
What is datadir?
What is index length in mysql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)