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 / vijay singh

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

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the latest version of mysql?

990


What are stored procedures and functions?

905


What is user in mysql?

890


What is a tinyint?

959


When to use order by in delete statement?

1020


Is mysql a odbc?

924


What language is mysql written in?

989


What is mysql and mysqli?

929


Write a query to count the number of rows of a table in mysql.

937


How do I restore a mysql database?

1085


How can we optimize stored procedure?

951


explain GROUPBY & HAVING clause with examples.

2291


Is mariadb better than mysql?

1041


Is there a free version of mysql?

942


What is data type for image in mysql?

870