How to: Delete Objects & Resolve Dependencies
09/10/2025 When you rename or delete an object in SQL Server Object Explorer , SQL Server Data Tools (SSDT) automatically detects all its dependency objects, and prepares an script to rename or
When you rename or delete an object in
Object Explorer
, SQL Server Data Tools
(SSDT) automatically detects all its dependency objects, and prepares an
script to
rename or drop the dependency as needed.
- Right-click a database in
Object Explorer
, and select.
- Accept all the default settings in the
dialog, and select.
- Make sure that the
table isn’t opened in either the Table Designer or the
Transact-SQL Editor.
- Expand the
node in
Object Explorer. Right-click the
table
and select.
- Change the table name to
and press ENTER.
- A
operation is immediately invoked on your behalf. SSDT calls the
stored procedure on your behalf to rename the table. If there are any
dependent objects such as foreign key constraints, they’re also updated.
- Apply the change following the steps in the previous
How to: Update a connected
database with Power Buffer
procedure.
- Right-click the
table in
Object Explorer
again, and select. Table data is intact after the rename operation.
2
Warning
Script-based dependencies such as references to a table from a view, or stored
procedures aren’t automatically updated by SSDT. After the rename, you can use the
pane to locate all other dependencies and manually fix them.
ALTER
Customer
Customer sp_rename
Customers