How to remove a table or table-structured object in the Diagram or SQL Pane in SQL server

Removing a table or table-valued object does not delete anything from the database; it only removes it from the current query.When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to remove a table or table-structured object, they should do the next:

– In the Diagram Pane, select the table, view, user-defined function, synonym, or query, and then press DELETE, or right-click the object and then choose Remove in the resulting dialog box. Developers can select and remove multiple objects at one time.


– Remove all references to the object in the SQL Pane.


When developers remove a table or table-valued object, the Query and View Designer automatically removes joins that involve that table or table-valued object and removes references to the object’s columns in the SQL Pane and Criteria Pane.