Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 row level locking?

0 Answers  


Explain the different types of constraints?

0 Answers  


How to get a list of all tables in a database?

0 Answers  


What is Foreign Key? What is the main difference between primary key and Foreign Key ? How Foreign Key can be defined? Is Foreign key is used to join two or more table?

4 Answers  


how we will Show selected records sorted in an ascending (asc) or descending (desc).

0 Answers  


How to determine the location of the data directory?

0 Answers  


what if you really want to store the timestamp data, such as the publication date of the article?

2 Answers  


How can you do the fine tunning?

3 Answers   ACC,


How to calculate the difference between two time values?

0 Answers  


What is procedures in mysql?

0 Answers  


How can we change the name of a column of a table?

7 Answers  


What is difference between unix timestamp and mysql timestamp?

0 Answers  


Categories