MySQLのSELECT文でcsvを出力する

  • 290
    Like
  • 2
    Comment
More than 1 year has passed since last update.
SELECT * FROM users
  INTO OUTFILE '/tmp/users.csv'
  FIELDS TERMINATED BY ','
  OPTIONALLY ENCLOSED BY '"';

こんな感じで出せます