How to modify a view (Enterprise Manager)

How to Install SQL Server 2000

How To

How to modify a view (Enterprise Manager)

To modify a view

  1. Expand a server group, and then expand a server.

  2. Expand Databases, expand the database in which the view belongs, and then click Views.

  3. In the details pane, right-click the view, and then click Design View.

  4. To add additional tables or views to the view, right-click in the diagram pane, and then click Add Table.
    • On the Tables or Views tabs, click the table or view to add to the new view, and then click Add. Repeat for each table or view you want to add to the new view.
  5. To remove an entire table or view from the view, in the diagram pane, right-click the title bar of the table, and then click Remove.

  6. In the Column box of the grid pane, select the columns to be referenced in the view.

  7. Select Output if the column is to appear in the result set of the view.

  8. To group by column, right-click the column, and then click Group By.

  9. In the Criteria column, enter the criteria specifying which rows to retrieve; this determines the WHERE clause. If Group By is specified, this determines the HAVING clause.

  10. In the Or column, enter any additional criteria to specify which rows to retrieve.

  11. Right-click anywhere in the grid pane, and then click Properties.

  12. Optionally, select:
    • Output all columns to display all columns in the view in the result set.

    • DISTINCT values to filter out duplicate values in the result set.

    • Encrypt view to encrypt the definition of the view.
  13. Optionally, in Top, enter the number of rows to return in the result set. Enter the word PERCENT after the number to return a percentage of rows in the result set.

  14. Right-click anywhere in the diagram pane, and then click Run (to view the result set) or Save (to save the view).

See Also

Modifying and Renaming a View