Translations of this page:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 10 / 昨日: 1
総計: 378
- Dokuwiki.fl8.jp(456)
- FreeBSD カーネル再構築(20)
- 05 rsync(20)
- 13 CentOS6メール設定(20)
最近の更新
このページへのアクセス
今日: 10 / 昨日: 1
総計: 378
The BIT field values are not displayed in MySQL.
It's because BIT values are characters that cannot be printed…
To see them, add UNSIGNED.
※ Specifying UNSIGNED allows only positive numbers to be stored.
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)