我可以自动将 MySQL Workbench ER 图与表数据类型匹配吗?
我在 MySQL Workbench 中创建了一个 ER 图和表,如下所示: 现在,当编写
CREATE TABLE
命令时,我需要手动匹配数据类型。如果我更改图中的数据类型,我也必须在 CREATE TABLE 命令中手动更改它。
我的问题是,在创建表时是否有一种自动生成数据类型并将其与ER图匹配的方法?
I created a ER diagram and table in MySQL Workbench as following:
Now when write the CREATE TABLE
command, I need to manually match the datatype. If I change the datatype in the diagram, I have to manually change it too in the CREATE TABLE
command.
My question is, is there an automatically way to generate and match the datatype with the ER diagram when creating the table?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在使用 MySQL Workbench 8.0.27,
假设您已经对模式进行了逆向工程并形成了相应的 ERD,并且出于任何原因您希望从 EER 图界面更改给定表中任何属性的数据类型,
很简单。
双击表格
底部面板会弹出创建表格界面
,可以编辑属性名称、类型和大小。在此处输入图像描述
I'm using MySQL workbench 8.0.27,
assuming that you have already reverse engineered a schema and formed the corresponding ERD, and for any reason you wish to change a data type of any of your attributes in a given table from the EER Diagram interface,
Its simple.
Double click on the table
The create table interface should pop from the bottom panel
There one can edit attribute names, type and size.enter image description here