tags:

views:

40

answers:

2

I have a Java application and have mapped a boolean field to a bit(1) field in MySql.

I know for sure that some rows have the value set to true and some to false, however, I can't see it from the mysql console - which is annoying when you try to debug things and understand what is going on.

Is it possible to configure mysql to display the bit(1) fields in a friendly manner?

mysql> select ignored from table;
+---------+
| ignored |
+---------+
|         | 
|         | 
|         | 
|         | 
|         | 
|         | 
|         | 
|         | 
|         | 
|         | 
+---------+
10 rows in set (0.00 sec)
+3  A: 
select ignored+0 from table;
dnagirl
A: 
select cast(ignored as unsigned) from table;
Kimvais