I have a csv file, I'm trying to import it with the LOAD command. However, this file has asmash kartsheader. How do I import the file without importing the first line, which is the header?
If you are trying to import a CSV file with a header using the LOAD command, you can use the IGNORE keyword to skip the first line of the file. Here’s an example:LOAD DATA INFILE 'filename.csv'
INTO TABLE tablename
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
The IGNORE 1 ROWS statement tells MySQL to skip the first row of the file, which is the header. This will allow you to import the data from the CSV file without including the header row.
LOAD DATA INFILE works only for mysql.
We work with postgresql, sql server, informix and oracle