Thursday, 22 August 2013

Export query result mysql Terminal Mac

Export query result mysql Terminal Mac

I am trying to export the results of an SQL query generated via Terminal
on a Mac (when I try the same procedure within MAMP it will only export
about 200 results before it gives an error message, so if I have 1000
results having to do it 5 times is a pain).
Based on questions asked here I have tried permutations of SELECT
WhateverINeed FROM 1911 INTO OUTFILE 'AnotherTest.csv' FIELDS TERMINATED
BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
So while this 'works' – Query OK, 729 rows affected – the file I want to
create AnotherTest.csv does not appear anywhere on my system that I can
see.

No comments:

Post a Comment