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

SQL Anywhere 12.0.0 » SQL Anywhere Server - SQL Usage » Working with database objects


Working with 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.

Suppose you frequently need to list the number of employees in each department. You can get this list with the following statement:

SELECT DepartmentID, COUNT(*)
FROM Employees
GROUP BY DepartmentID;

You can create a view containing the results of this statement using either Sybase Central or Interactive SQL.

 Restrictions on SELECT statements for regular views
 Updating regular views
 Copying regular views
 Using the WITH CHECK OPTION option
 See also

Regular view statuses
Create regular views
Alter regular views
Drop regular views
Enable and disable regular views
Browsing data in regular views
View system table data