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?

Answer Posted / vipul dalwala

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does php communicate with mysql?

896


What is difference between pdo and mysqli?

967


How do I know if mysql is installed on windows?

911


How to show all tables with 'mysql'?

995


What does mysql_fetch_assoc do?

956


Why do we write stored procedures?

914


What is a longblob?

939


What are Heap tables?

1555


Consider a scenario where you have to send an email to a client from the sql database. How do you think you can achieve this task?

966


What is mysql gpl?

838


How to get current MySQL version?

1077


Can you tell the difference between mysql_connect and mysql_pconnect? : Mysql dba

1010


What is unique key in mysql?

978


Which is faster innodb or myisam?

1016


How do I connect to mysql database?

1036