From:http://database.51cto.com/art/201203/323863.htmMany people on the web are consulting MySQL for Boolean types? The MySQL database does provide a Boolean type that can be written as a Boolean type bool or Boolean type Boolean, but does the MySQL
About MySQL for Boolean and tinyint (1)Boolean typeMySQL saves a Boolean value with 1 for true,0 representing False,boolean in MySQL with type tinyint (1),There are four constants in MySQL: True,false,true,false, which represent 1,0,1,0 respectively,
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
About MySQL for Boolean and tinyint (1)Boolean typeMySQL saves a Boolean value with 1 for true,0 representing False,boolean in MySQL with type tinyint (1),There are four constants in MySQL: True,false,true,false, which represent 1,0,1,0 respectively,
Boolean typeMySQL saves a Boolean value with 1 for true,0 representing False,boolean in MySQL with type tinyint (1),There are four constants in MySQL: True,false,true,false, which represent 1,0,1,0 respectively,Mysql> Select True,false,true,false;+--
Using in Boolean mode to modify the program, MySQL can also perform Boolean Full-text search:
mysql> SELECT * FROM articles WHERE MATCH (title,body) -> AGAINST ('+MySQL -YourSQL' IN BOOLEAN MODE); +----+-----------------------+--------------------
Mysql boolean settings bitsCN.com
Mysql boolean settings
MySQL does not have the boolean type. This is also a strange phenomenon. Example:
Create table xs
(
Id int primary key,
Bl boolean
)
In this way, you can create a table
(i) data type test (1). Boolean type Bool/boolean and micro-integral tinyint a). To create a test table structure Root@localhost:test 05:12:49> CREATE TABLE boolean_test (ID INT not NULL auto_increment, -> Online_flag BOOL, -> Lock_flag BOOLEAN, ->
MySQL does not have a Boolean type. This is also a very strange phenomenon. Cases:Create Table xs ( intprimarykey, bl Boolean)This is a good way to create a success, but looking at the statement after the build, you will find that MySQL replaced
Original: http://blog.csdn.net/woshixuye/article/details/7089508MySQL saves a Boolean value with 1 for true,0 on behalf of false. The Boolean type in MySQL is tinyint (1). There are four constants in MySQL: True,false,true,false represents 1,0,1,0
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.