无法在使用DBeaver的表中将列更改为BOOLEAN。

huangapple go评论60阅读模式
英文:

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:

无法在使用DBeaver的表中将列更改为BOOLEAN。

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:

无法在使用DBeaver的表中将列更改为BOOLEAN。

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:

无法在使用DBeaver的表中将列更改为BOOLEAN。

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:

无法在使用DBeaver的表中将列更改为BOOLEAN。

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.

huangapple
  • 本文由 发表于 2023年2月19日 17:22:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75499117.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定