12

How do I display that schema of tables in my database and foreign keys that links them in VS ?

Example of such schema is used in this question mattlant's answer.

Community
  • 1
  • 1
Rasto
  • 17,204
  • 47
  • 154
  • 245

1 Answers1

15

They can be done through Visual Studio or the Sql Server Management Studio.

In visual studio just open the "Server Explorer" window, right-click on the Database Diagrams folder (under the db you want), and choose "Add Database Diagram", just drag-and-drop the tables you want onto the diagram.

Through Sql Server management studio there done the same way (just without the server explorer window).

gillyb
  • 8,760
  • 8
  • 53
  • 80
  • 1
    The "Database Diagrams" folder is visible in the SSMS but not in the VS. It was apparently deprecated in VS 2012. – Pawel Jun 18 '23 at 20:56