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 use command in mysql?
Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the total number of sold products
What are the advantages of stored procedures, triggers, indexes?
Is mysql written in c?
How to delete a table.
How do you change a password for an existing user via mysqladmin?
Is sql similar to mysql?
What ascii 31?
How big is a blob mysql?
What are the functions of mysql?
What is database url for mysql?
Can we store pdf files in mysql?