MySQLのSELECT文でcsvを出力する

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

こんな感じで出せます