Mysql has two types that can contain logical data, bit and bool. Bit (1) seems more logical, since it should be 1 or 0, bool, according to the specifications, coincides with the linear (1)
To store things semi-universal / portable for other database providers, use BIT. MySQL is one step ahead of most servers, even with the BOOLEAN keyword.
See: Comparing Different SQL Implementations
Au contraire, bool looks much more logical, especially if you want to write down the truth and falsehood.
I think it depends on your application and client library. Some layers of database abstraction may expect a boolean to be an integer. (I know technically a bit is an integer)
bool, according to the specifications, the same as saying tinyint (1)
Does this mean that a bool can have more than two possible states (discarding the nullability value)? If so, then bit (1) is definitely better since there is no possibility for ambiguity. What would your application do when it received a value of 3 for the true / false field?
bool
Source: https://habr.com/ru/post/1304650/More articles:include latex shape files - pdflatexHow can I get a datagridview to select only cells in one column at a time? - inheritanceHiding a row in a DataGridView Very slow - c #Why are these two sql statements locked? (Deadlock schedule + details included) - .netProblem with Three20 TTPhotoViewController - objective-cIs there a limit on the size of code snippets in Visual Studio 2008? - .netjquery live tabIndex - jqueryIs REST required for MVC? - design-patternsC # KeyEvent does not register input / return key - c #Automatic annotation "canShowCallOut" IPHONE - iphoneAll Articles