List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 1 1999 5:27pm
Subject:Does mysql not support bools? (or is this the correct behaviour? :)
View as plain text  
>>>>> "Thomas" == Thomas S Iversen <zensonic@stripped> writes:

>> Description:
Thomas> 	When doing:
Thomas>              create table t (a int, b text, c bool, d double)
Thomas> 	     insert into t values (1960, 'Lone', 'true', NULL)
Thomas>              insert into t values (1960, 'Peter', 'false', 78.1)
Thomas> 	     select * from t;

Thomas> 	i get
Thomas> 		+------+-------+------+---------+
Thomas> 		| a    | b     | c    | d       |
Thomas> 		+------+-------+------+---------+
Thomas> 		| 1960 | Lone  |    0 |    NULL |
Thomas> 		| 1960 | Peter |    0 | 78.1000 |
Thomas> 	        +------+-------+------+---------+

Thomas> 	And I can see that c is a Int. I'm implementing a MoscowML
Thomas>         interface to mysql but came upon this problem.

Hi!

Yes, you are correct:

MySQL doesn't support bool;  MySQL only supports the bool keyword to
make emigration easier from databases that has the bool type.

Regards,
Monty
Thread
Does mysql not support bools? (or is this the correct behaviour? :)Thomas S. Iversen1 Jul
  • Does mysql not support bools? (or is this the correct behaviour? :)Michael Widenius1 Jul