MySQL Workbench 自动增量已禁用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33602936/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MySQL Workbench auto increment disabled
提问by Alexander Ivanov
I am using Workbench version 6.3.5 Community and this is GUI question only.
我使用的是 Workbench 6.3.5 版社区,这只是 GUI 问题。
When creating a new table auto increment check-box is disabled.
Is it a bug or I need to enable this some how in options?
And how to set start value and step for auto increment in GUI when creating a table?
创建新表时自动增量复选框被禁用。
这是一个错误还是我需要在选项中启用它?
创建表时如何在GUI中设置自动增量的起始值和步长?
回答by marchWest
As a work around, when you click the 'Apply' button and are presented with the generated script to review, you can actually edit that script. I ran into the issue you posted as well and just manually added AUTO_INCREMENT to the column definition I needed it applied to.
作为一种变通方法,当您单击“应用”按钮并看到生成的脚本以供查看时,您实际上可以编辑该脚本。我也遇到了你发布的问题,只是手动将 AUTO_INCREMENT 添加到我需要它应用的列定义中。
回答by connelblaze
Just check the AI(Auto Increment) checkbox. No work around, that's why it's a workbench. Life made easy
只需选中 AI(自动增量)复选框。没有解决办法,这就是为什么它是一个工作台。生活变得轻松
回答by Halil Saltik
You can do it this way
你可以这样做
Halil Saltik
哈利勒·萨尔提克
回答by Wole Ajala
Make sure the datatype is INT, not character based.
确保数据类型是 INT,而不是基于字符的。