Mysql Boolean booleantinyint (1)

Source: Internet
Author: User
Mysql boolean booleantinyint (1) mysql official documentation pointed out that currently does not support the boolean type, use tinyint (1) instead. If you define a boolean type, it automatically converts it to tinyint. BOOL and BOOLEAN are synonyms of TINYINT (1. The zero value is considered false. The non-zero value is true. Constant TRUE in mysql

Mysql boolean tinyint (1) The Official mysql documentation indicates that the boolean type is not supported currently. If you need to use it, replace tinyint (1. If you define a boolean type, it automatically converts it to tinyint. BOOL and BOOLEAN are synonyms of TINYINT (1. The zero value is considered false. The non-zero value is true. Constant TRUE in mysql

Mysql boolean tinyint (1)
The official mysql documentation indicates that the boolean type is not supported currently. Replace tinyint (1) with tinyint (1) if necessary. If you define a boolean type, it automatically converts it to tinyint.

BOOL and BOOLEAN are synonyms of TINYINT (1. The zero value is considered false. The non-zero value is true.

In mysql, the constant "TRUE" is equal to 1, and the constant "FALSE" is equal to 0. The constant name can be written in either upper or lower case.


Select true, true, FALSE, false;-> 1, 1, 0



Note that only tinyint (1) can be converted to true or false during query. tinyint (4) does not. Remember.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.