My 2 paisas

Posts Tagged ‘query

When you want to import the results of a query into a csv, you can use the following mysql query.

SELECT a,b,a+b INTO OUTFILE ‘/tmp/result.text’
FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘
LINES TERMINATED BY ‘\n’
FROM test_table;

Advertisements

Links that I liked to save

Blog Stats

  • 44,620 hits