Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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



if we want to load data from a text file into a mysql table, but the columns in table are 1st: code..

Answer / vijay singh

LOAD DATA INFILE 'data.txt' INTO TABLE table2
FIELDS TERMINATED BY ',';

Is This Answer Correct ?    3 Yes 0 No

if we want to load data from a text file into a mysql table, but the columns in table are 1st: code..

Answer / vipul dalwala

LOAD DATA INFILE 'data.txt' INTO TABLE table_name
(city,code);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is offset limit?

0 Answers  


how to Return total number of rows.

0 Answers  


What tools available for managing mysql server?

0 Answers  


how to delete duplicate rows in sql server 2005?

2 Answers   EWIT, Reliance,


How does select query work?

0 Answers  






HOW TO FIND display the total number of weeks in the year of 1998 IN EMP TABLE

0 Answers  


What is the datatype of image?

0 Answers  


how many fields can be updated using set in a mysql query?

1 Answers  


If you specify the data type as DECIMAL (5,2), what?s the range of values that can go in this table?

2 Answers  


Why phpmyadmin is used for mysql?

0 Answers  


What are the functions used to encrypt and decrypt the data present in mysql?

0 Answers  


How does mysql store data?

0 Answers  






Categories