When you rename tables in physical data models by using
the refactoring feature in this product, you also can update view
references automatically.
Before you begin
Prerequisites: You must have a physical data model
stored in a data design project.
About this task
If you choose to update view references, you can make
the following choices about updating their SQL expressions:
- Whether to search the views within only the schema or within the
entire model of the renamed table.
- Whether to perform a case-sensitive search for the
original table name.
In addition to this method, you can also rename tables
by highlighting a table object in a physical data model and pressing
F2, either from the Data Project Explorer or from a data diagram.
However, if you use the F2 method, view objects are not automatically
updated. Therefore, the approach that is described in this topic is
the preferred method for renaming tables.
To rename and refactor
a table in a physical data model:
- In the Data Project Explorer, expand a physical data model
and right-click a table.
- Select . The
Rename Table wizard opens.
- Complete the steps of the wizard. To see information about
the fields in the wizard, press F1.
- Click Finish.
Results
The table is renamed, and any views that reference the table
are also updated, if you specified this option. The changes are visible
in the Data Project Explorer and in data diagrams that contain these
objects.