Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Tables, views, and indexes » Views


Regular views

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;
 Restrictions on SELECT statements for regular views
 Statements that update regular views
 See also

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