I am learning MySql and need help with ‘INTO FILE’. I have managed to terminate with commas but the last entry in the file also contains a comma which means when imported treats it as a blank entry.
Could someone show me the corret way to use ‘INTO FILE’ by way of an example. I have posted my query if it helps but it is almost certainly incorrect. Many thanks
Select boxes.custref From boxes Where boxes.customer = 'demo' AND department = 'demo' INTO OUTFILE '/temp/demodept.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY ',';