On 05/22/2013 06:55 PM, Neil Tompkins wrote:
Hi,
I've just created some tables that I designed using the MySQL Workbench
Model. However, the database type BOOLEAN which was in my models has been
converted to TINYINT(1); I'm currently running MySQL Version 5.6.2-m5 on
Windows 2008 server.
BOOLEAN has been a simple alias for TINYINT in MySQL ever since,
for a more "true boolean" you may want to try BIT(1)
http://dev.mysql.com/doc/refman/5.6/en/bit-type.html
The BIT type was introduced in 5.6.
For example:
create table b1 (id int primary key, b bit(1));
insert into b1 values(1, true);
insert into b1 values(2, false);
select * from b1 WHERE b = true;
==>
+----+------+
| id | b |
+----+------+
| 1 | [00 01] |
+----+------+
1 row in set (0.00 sec)
Note that the BIT column value is actually returned as a
VARBINARY string though ...
--
hartmut
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql