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,
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 has a lot of visual management tools, such as "Mysql-workbench" and "sequel-pro-". Now I am writing mysql Terminal command Operation article, is to strengthen my understanding of MySQL, always better than the use of graphical understanding,
(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, ->
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;+--
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
In the practical application, often need to implement in a query statement to display more than one table of data, this is called a multiple table data record connection query, referred to the next year will be the query.
When you implement a
Mysql's boolean setting does not have the boolean Type in MySQL. This is also a strange phenomenon. For example, create table xs (id int primary key, bl boolean) can be created successfully, but you can check the statements after the table is
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
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.