When you browse data, a query operates on one or more database objects and produces a result set. Just like a base table, a result set from a query has columns and rows. A view gives a name to a particular query, and holds the definition in the database system tables.
When you create a regular view, the database server stores the view definition in the database; no data is stored for the view. Instead, the view definition is executed only when it is referenced, and only for the duration of time that the view is in use. Creating a view does not require storing duplicate data in the database.
Suppose you need to list the number of employees in each department frequently. You can get this list with the following statement:
SELECT DepartmentID, COUNT(*) FROM Employees GROUP BY DepartmentID;
Statuses for regular views
Creating a regular view
Altering a regular view
Dropping a regular view
Disabling or enabling a regular view (Sybase Central)
Disabling or enabling a regular view (SQL)
Browsing data in a regular view
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|