比如,我需要一个真假型的字段,我应该选什么样的字段类型啊?谢谢!!!

解决方案 »

  1.   

    真假型的字段?  mysql不是有个类型是bool的吗? 用这个不行?
      

  2.   

    是这样的啊,我选择了bool,但自动分配了tinyint(1)
    这是什么原因啊?
      

  3.   

    用 tinyint 就行了 用 bit 还得转换
      

  4.   


    tinyint(1) 值, 你不知设置成0和1就ok了吗
      

  5.   

    bool 就是tinyint(1)BOOL, BOOLEAN These types are synonyms for TINYINT(1). A value of zero is considered false. Non-zero values are considered true