This question already has an answer here:
这个问题在这里已有答案:
- What's the difference between MySQL BOOL and BOOLEAN column data types? 4 answers
- MySQL BOOL和BOOLEAN列数据类型之间有什么区别? 4个答案
I am learning MySQL and when I wanted to add a boolean column, I saw there were two options: bool and boolean. Is there any difference between them? Thank you for your time.
我正在学习MySQL,当我想添加一个布尔列时,我看到有两个选项:bool和boolean。它们之间有什么区别吗?感谢您的时间。
Edit: what should I write in the length of the bool type.
编辑:我应该以bool类型的长度写什么。
1 个解决方案
#1
18
BOOL and BOOLEAN are both synonyms from TINYINT(1) (source). In other words, there is no difference.
BOOL和BOOLEAN都是TINYINT(1)(source)的同义词。换句话说,没有区别。
#1
18
BOOL and BOOLEAN are both synonyms from TINYINT(1) (source). In other words, there is no difference.
BOOL和BOOLEAN都是TINYINT(1)(source)的同义词。换句话说,没有区别。