FrontPage > DataBase > MySQL > MySQLメモ
mysql> show variables like "char%";
utf8 | mysql> SET NAMES utf8; |
SJIS | mysql> SET NAMES sjis; |
EUC | mysql> SET NAMES ujis; |
ファイルのランゲージ(S-JIS、EUC、UTF-8)とmysqlのランゲージを一致させる必要あり。
mysql> load data local infile '[ファイル名]' into table [テーブル名];
mysql> load data local infile '[ファイル名]' into table [テーブル名] fields terminated by ',';
Query OK, 999 rows affected, 9999 warnings (0.09 sec) Records: 999 Deleted: 0 Skipped: 0 Warnings: 9999
mysql> show warnings;
項目一行表示は、 「select * from [table];」->「select * from [table] \g」