mybatis中用tinyint保存Boolean类型_xue317378914的专栏
一、boolean类型 MYSQL保存BOOLEAN值时用1代表TRUE,0代表FALSE,boolean在MySQL里的类型为tinyint(1), MySQL里有四个常量:true,false,TRUE,FALSE,它们分别代表1,0,1,0, mysql> select true,false,TRUE,FALSE; +------+-------+------+-------+ | TRUE | FALSE | TRUE | FALSE | +------+-------+------+-------+ | 1 | 0 | 1 | 0 | +------+-------+------+-------+ 可以如下插入boolean值:insert into [xxxx(xx)] valu...阅读全文