use people;
SELECT 'first' UNION SELECT first from e where skills regexp "javapl" INTO OUTFILE '/home/ankit/csv/tablename.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n';
this runs without problem to /var/tmp folder but other folders gave error:13 can't write please help