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 the maximum length of a table name, database name, and fieldname in MySQL?
3 Answers Accenture, Pioneer, TISL,
Is there a free version of mysql?
Where does mysql store data?
What is the difference between the LIKE and REGEXP operators?
How do you control the max size of a HEAP table?
Is mariadb faster than mysql?
What is mysql default port number?
Is mysql written in c?
What is data node in mysql cluster?
What is a user defined variable?
What is pragma exception?
What is the usage of ENUMs 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)