Question

I would like to create a database diagram in SQL Server 2008 and have a View in the diagram. is there a way to do this?

Was it helpful?

Solution

I don't think so. SQL Server Management studio allows only Tables to be included in the database diagram. If you have Microsoft Visio, you can use that to include the Views in your database diagram.

OTHER TIPS

Download SQL Sentry Plan Explorer - this is a free app that significantly extends the built-in execution plan functionality in Management Studio. Also grab the Management Studio add-in (you'll have to re-start SSMS). Once installed, in SSMS, run the following query, with "Actual Execution Plan" turned on:

SELECT * FROM dbo.view;

Right-click the Execution Plan and choose "View with SQL Sentry Plan Explorer."

Once the plan is open in Plan Explorer, you can see the base tables that are referenced by the view (even if they are nested) on the Join Diagram tab in the lower pane.

Disclaimer: I work for SQL Sentry, but there are absolutely no strings attached.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top