I currently have the database diagram window open in Microsoft Server Management Studio 2014. Is there a way to "refresh" the view so that I can see a newly added foreign key constraint?
I currently have the database diagram window open in Microsoft Server Management Studio 2014. Is there a way to "refresh" the view so that I can see a newly added foreign key constraint?
3条答案
按热度按时间fquxozlt1#
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. 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!
9rbhqvlz2#
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.
6ss1mwsb3#
In Microsoft SQL Management Studio 19 (and higher, could not test lower version) If you just added the column to your table through and Alter command,
Step 2 is important, otherwise the Object Explorer does not know about the new column, and it won't be able to add it to your diagram.