英文:
Cannot change to BOOLEAN a column in table using DBeaver
问题
I have one table in MySQL where I would like to change the "Data type" of two columns in DBeaver (version 22.3.4). The two columns are MD_Estimated
and BL_Estimated
as you can see in this image:
However, when I save the changes, this is the code which is run:
ALTER TABLE Kruda_Denta_Datumbazo.CrownDiameterTable MODIFY COLUMN MD_Estimated BOOL NULL;
ALTER TABLE Kruda_Denta_Datumbazo.CrownDiameterTable MODIFY COLUMN BL_Estimated BOOL NULL;
But the problem is that it does not return any error, but the "Data type" is not saved as BOOL
, but as tinyint(1)
, as you can see in this image:
Am I doing something wrong?
英文:
I have one table in MySQL where I would like to change the "Data type" of two columns in DBeaver (version 22.3.4). The two columns are MD_Estimated
and BL_Estimated
as you can see in this image:
However, when I save the changes, this is the code which is run:
ALTER TABLE Kruda_Denta_Datumbazo.CrownDiameterTable MODIFY COLUMN MD_Estimated BOOL NULL;
ALTER TABLE Kruda_Denta_Datumbazo.CrownDiameterTable MODIFY COLUMN BL_Estimated BOOL NULL;
But the problem is that it does not return any error, but the "Data type" is not saved as BOOL
, but as tinyint(1)
, as you can see in this image:
Am I doing something wrong?
答案1
得分: 1
TINYINT(1) 和 boolean 在 MySQL 中是同义词。在底层,bool 被转换为 TINYINT(1)。
英文:
TINYINT(1) and boolean are synonymous In MySQL. Bool is converted to TINYINT(1) under the hood.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论