Views

Last modified: July 8, 2025

Database Explorer allows you to perform operations on views using the shortcut menu. Right-click an object in Database Explorer to access commands for specific tasks, such as creating or editing a view, exporting/importing data, etc.

Create a view

To create a view:

1. In Database Explorer, right-click a view or the Views node and select New View.

2. In View Editor that opens, specify the view details. For more information, see Work with View Editor.

3. At the bottom of View Editor, select Apply Changes to save the view.

Edit a view using View Editor

To edit a view:

1. In Database Explorer, right-click the view you want to edit and select Open Editor.

2. In View Editor that opens, update the view details.

Note

In the visual View Editor, changing the view schema is not supported. This action requires moving the view to a different schema, rather than modifying its structure.

3. At the bottom of View Editor, select Apply Changes to save and apply the changes made to the view.

Edit a view using SQL

1. In Database Explorer, right-click the view you want to edit and select Modify via SQL.

2. In a SQL document that opens, edit the view.

3. On the SQL toolbar, select Save to save the changes. Alternatively, go to the File menu and select Save or press Ctrl+S.

Delete a view

To delete a table:

1. In Database Explorer, right-click the view you want to delete and select Delete. Alternatively, press Del.

2. In the Drop View confirmation dialog that opens, select Yes to confirm the deletion.

Note

You cannot undo the drop view operation, as it permanently deletes all its data and structure. It is recommended that you back up the database before deleting it. For instructions, see How to back up a SQL Server database.

Manage data

To manage data:

1. In Database Explorer, right-click the view and select Open Data in Editor. Alternatively, select Open Editor and switch to the Data tab.

2. On the Data tab of View Editor that opens, view the available data in the grid.

3. To perform any action on the data, right-click the selected row and then select the required command from the shortcut menu.

For more information, see Work with data in Data Editor.

Retrieve data

To retrieve data from the selected view, in Database Explorer, right-click it and select Select All Rows.

Rename a view

To rename a view:

1. In Database Explorer, right-click the selected view and select Rename.

2. Specify the view name.

Shortcut menu commands

The following table describes the shortcut menu commands, which appear when you right-click a view in Database Explorer.

Name Description
Manage Index Fragmentation Opens the Index Manager document to analyze SQL indexes by collecting index fragmentation statistics and detecting databases that require maintenance.
Export Data Opens the Data Export wizard to export data to a file with the supported file extension.
Duplicate Object Opens the Duplicate Object dialog to copy object structure and/or data.
Generate Script As Generates a script of the selected view using the CREATE, CREATE and ALTER, DROP, DROP and CREATE, ALTER, SELECT, INSERT, UPDATE, DELETE, INSERT/UPDATE STORED PROCEDURE, or EXEC statements. The view can be saved to a new SQL document or a file, or copied to the clipboard.
Send to > Query Builder Adds the selected view to the Query Builder diagram.
Send to > Master Detail Browser Adds the selected view to the Master Detail Browser document.
Send to > Database Diagram Adds the selected view to a database diagram.
Send to > Data Report Adds the selected view to a simple data report.
Send to > Chart Designer Opens Chart Designer to create a chart.
Send to > Pivot Table Opens the query document to create a pivot table.
Show Details Opens Object Viewer to view object details.
Refresh Updates the object to reflect the latest changes. Alternatively, press F5.
Properties Opens the Properties pane to view the object information. Alternatively, press F4.