简体   繁体   English

如何在Microsoft SQL Server Management Studio中更新数据库图表

[英]How do I update a database Diagram in Microsoft SQL Server Management Studio

我目前在Microsoft Server Management Studio 2014中打开了数据库图表窗口。有没有办法“刷新”视图,以便我可以看到新添加的外键约束?

It looks like the best way is to right click on the diagram and choose "remove table from diagram". 看起来最好的方法是右键单击图表并选择“从图表中删除表格”。 Then right click in the white space and choose "Add Table". 然后右键单击空白区域并选择“添加表格”。 It will then show newly created relationships. 然后它将显示新创建的关系。

Close the diagram. 关闭图表。 Right click on the diagram name under the "Database Diagrams" node on the tree to the left and select "Refresh", then re-open the diagram. 右键单击左侧树上“Database Diagrams”节点下的图表名称,选择“Refresh”,然后重新打开图表。 That worked for me when I was trying to get the new fields, updated field names, and updated "nullable" values to display. 当我试图获取新字段,更新字段名称和更新的“可空”值以显示时,这对我有用。 It also didn't scramble the custom layout I did in the diagram, which I was afraid might happen. 它也没有扰乱我在图中所做的自定义布局,我担心这可能会发生。 If your diagram is missing entire tables, then open the diagram, right click in the diagram's blank space, and select "Add Table" to add missing tables. 如果您的图表缺少整个表格,则打开图表,右键单击图表的空白区域,然后选择“添加表格”以添加缺失的表格。

This was the first result that came up when I was trying to figure out how to refresh the tables to reflect new fields and such. 这是当我试图弄清楚如何刷新表以反映新字段等时出现的第一个结果。 I was hoping I wouldn't have to delete/re-add each table one-by-one! 我希望我不必一个一个地删除/重新添加每个表!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Microsoft SQL Server Management Studio 生成数据库的实体关系 (ER) 图? - How to generate Entity Relationship (ER) Diagram of a database using Microsoft SQL Server Management Studio? SQL Server Management Studio - 如何在数据库图表中建模此数据库约束 - SQL Server Management Studio - How to model this database constraint in a Database Diagram SQL Server Management Studio 中的数据库图是否被视为 ER 图? - Is database diagram in SQL Server Management Studio considered as ER diagram? 如何在Microsoft SQL Server Management Studio数据库表中自动递增主键,数据类型声明为uniqueidentifier - How do I auto increment the primary key in a Microsoft SQL Server Management Studio database table, the datatype is declared as uniqueidentifier 如何在Microsoft SQL Server Management Studio 2014中更新表 - How to update a table in Microsoft SQL Server Management Studio 2014 如何在Microsoft SQL Server 2008 Management Studio中仅将数据库中的索引生成到sql文件中? - How can I generate only indexes from a database into a sql file in Microsoft SQL Server 2008 Management Studio? 如何在Microsoft SQL Server Management Studio中添加新数据库? - How to add new database in Microsoft SQL Server Management Studio? 我复制了一个包含数据库信息的 SQL 文件夹,我想将它添加到 Microsoft SQL Server Management Studio。 我该怎么做呢? - I copied an SQL folder that contains database info and I would like to add it to Microsoft SQL Server Management Studio. How Do I do this? 如何在 Microsoft SQL Server Management Studio 中解决此错误 - How can I resolve this error in Microsoft SQL Server Management Studio 打开数据库图表后,SQL Server Management Studio 崩溃 - SQL Server Management Studio crashes after opening database diagram
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM