Which is not enabled by default due to certain issues, we could have something like:įor those using TINYINT this way and nobody would lose any functionality. It provides SQL development, data modeling, data migration, and comprehensive administration tools for server configuration, user. It is developed and maintained by Oracle. If I can make my position more clear, the same way we have a: Using Boolean mode in MySQL allows you to perform a full-text search based on very complex queries, using Boolean operators. MySQL Workbench is a unified visual database designing or graphical user interface tool used for working with database architects, developers, and Database Administrators. This is an unfortunate choice on their end, because if you INSERT a TRUE you expect to SELECT a TRUE as well and there's no CAST(column AS BOOLEAN) available either, but this what we have to deal with, and we have a chance to "adhere to the standards" by letting that choice "up to the application". ![]() In the same documentation they mention the mapping they're doing from BOOLEAN to TINYINT, which is what their other own product Workbench does (to TINYINT(1)) and how the DB works: if you INSERT a TRUE (without '') into a TINYINT column it's understood (.and stored) as a 1. If you agree that "let the application do what it wants with it" is a standard, as it's what's written in the MySQL docs, then it's precisely what I'm suggesting in order to avoid said conjectures. Evaluates to 1 if the operand is 0, to 0 if the operand is nonzero, and NOT NULL returns NULL. For example, the following statements all assess to TRUE : mysql> SELECT 10 IS TRUE -> 1 mysql> SELECT -10 IS TRUE -> 1 mysql> SELECT 'string' IS NOT NULL -> 1 NOT, Logical NOT. Whether it is used is up to the application.) MySQL evaluates any nonzero, non- NULL value to TRUE. (That is, this width is present in the metadata returned with result sets. This optional display width may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. The display width does not constrain the range of values that can be stored in the column. ![]() ![]() The documentation for the numeric types says indeed: MySQL Workbench is made by Oracle, so it's a first-party product (relative to MySQL Server).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |