DROP TABLE IF EXISTS facture; CREATE TABLE facture ( numfacture INT NOT NULL AUTO_INCREMENT, numtable INT NOT NULL, numserveur INT NOT NULL, datefacture DATE NOT NULL, PRIMARY KEY (numfacture) ); LOAD DATA LOCAL INFILE './cafe/facture.csv' INTO TABLE facture FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES ( numfacture, numtable, numserveur, @datefacture ) SET datefacture = STR_TO_DATE(@datefacture, "%d-%b-%y"); -- TODO: other tables