0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

INTO OUTFILE の出力先

Posted at

問題

sql結果をcsvファイルで出力したもののどこに行ったかわからなかった。

MariaDB [test]> select * from users INTO OUTFILE '/tmp/user-data.csv' FIELDS TERMINATED BY ',';

解決

mariadbの場合、/tmp/systemd-mariadb.service-XXXXXXXに出力される。

MariaDB [test]> system sudo cat /tmp/systemd-private-xxxxx-mariadb.service-xxxxx/tmp/user-data.csv;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?