Question: how to Import a file.csv with only the odd rows into MySQL. //this line add all the 1000 records that the file contains into my

how to Import a file.csv with only the odd rows into MySQL.

//this line add all the 1000 records that the file contains into my table called "users" but I want to add only ODD lines from the file.

LOAD DATA LOCAL INFILE '/root/users.csv' INTO TABLE users FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY ' '

how do I do that so it only gets the ODD rows that are in the file?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!