更改整个表中 MySQL ENUM 值的值
我想知道是否可以更改整个表中的 ENUM
值,以便在表示所述 ENUM
值的所有行中也进行更改。
I'm wondering if it is possible to change an ENUM
value throughout a table, so that in all the rows where said ENUM
value is represented, the change is made as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你想改变枚举的值:
假设你的旧枚举是:
要改变这种用途:
MySQL可能会遍历表中的所有行来尝试更新内容,我听说过围绕它进行计划优化的故事,但我不确定这是否真的发生了。
If you want to change the value of an enum:
Suppose your old enum was:
To change that use:
MySQL will probably go through all the rows in your table trying to update stuff, I've heard stories of a planned optimization around that, but I'm not sure if that actually happened.