After Exporting Database should be empty I am exporting data from database for that I have written following query:

SELECT ParameterID, Name,Type,Datatype,LogDate
FROM Param_Ems
WHERE DataType = 10
INTO OUTFILE 'C:/tmp/ParamData.csv'
FIELDS ENCLOSED BY '"' TERMINATED BY ';' ESCAPED BY '"'
LINES TERMINATED BY '\r\n';


Is there any way to export and delete these records within the same query?
Use pt-archiver tool. It can delete data that it moves. Alternatively use drop &amp; create after the select into outfile.