Progress
SQL-89
Guide and Reference


Views

A view is a virtual table that consists of rows and columns from one or more tables in a database. To the user, a view looks like a table, but it does not exist as such. A view represents data in the table or tables used to define it, rather than physical data of its own.

CREATE VIEW

Creates a view from columns and rows of one or more existing tables or other views.

DROP VIEW

Deletes a view from the database.

To create a view you must have at least the SELECT privilege on the tables to which the view refers (see the "Access Privileges" section for more information). When you create a view, you become its owner. If the view is updatable, the owner’s initial privileges are the same as the privileges on the underlying table. If the view is not updatable, the owner’s initial privilege is SELECT only. The "Updating Views" section describes the conditions that determine whether a view is updatable.

The owner of a view has the GRANT OPTION on these privileges only if the owner also has the GRANT OPTION on the corresponding privileges of the underlying table. Privileges inherited from the underlying tables are those in effect at the time you create the view. Changes to privileges in the underlying tables do not affect the privileges in existing views.

Once you have created a view, you can use it as a table; the view follows the same semantics as a table. You can update the underlying table through the view if the view is updatable. You cannot create an index on a view or alter a view. In addition, only the owner of a view can delete that view.

To see information that is stored for a particular view, choose Admin Load Data and Definitions SQL Views from the Data Administration tool, or use SELECT statements to extract the fields from the _View schema table.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095