このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 麻雀ルール [チップ・焼鳥について]
- 71 vsftpd [Difference Between PASV Mode and ACTIVE Mode]
- 2024.07.02 Windowsライセンス有効期限 [ライセンスの有効期限を確認方法]
最近の更新
MySQLでBITフィールド値が表示されない。
BIT値が印刷できない文字だから。。。
もし見るには、UNSIGNEDをつける。
※UNSIGNED を指定すると正の数しか格納できなくなります。
mysql> desc test; +---------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+---------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | name | text | YES | | NULL | | | enabled | bit(1) | YES | | NULL | | +---------+---------+------+-----+---------+----------------+ 3 rows in set (0.00 sec) mysql> insert into test (name,enabled) VALUES('AAA',b'1'); Query OK, 1 row affected (0.01 sec) mysql> insert into test (name,enabled) VALUES('BBB',b'0'); Query OK, 1 row affected (0.00 sec) mysql> select * from test; +----+------+---------+ | id | name | enabled | +----+------+---------+ | 1 | AAA | | | 2 | BBB | | +----+------+---------+ 2 rows in set (0.00 sec)