“ERROR 1406: 1406: Data too long for column” but it shouldn't be?

后端 未结 3 1835
暖寄归人
暖寄归人 2021-02-05 23:54

I have the following table structure:

DROP TABLE IF EXISTS `tblusers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_         


        
3条回答
  •  感情败类
    2021-02-06 00:22

    The BIT data type is used to store bit values. A type of BIT(M) enables storage of M-bit values. M can range from 1 to 64.

    UPDATE tblusers SET IsAdmin=b'1' WHERE UserID='012';

    UPDATE tblusers SET IsAdmin=b'0' WHERE UserID='012';

提交回复
热议问题