How to load csv data to mysql table using mysql stored procedure

30 views Asked by At

The below My SQL query working for load csv data to table

LOAD DATA INFILE 
'C:\\ProgramData\\MySQL\\MySQL Server 8.0\\Uploads\\sales3.csv'
INTO TABLE ttsales
FIELDS TERMINATED BY ';'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;

But not working while using in stored procedure

As per my search I found that LOAD DATA will not work due to security reason

ERROR:

Error Code: 1314
LOAD DATA is not allowed in stored procedures

Can we have other alternatives to load csv data

0

There are 0 answers