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.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0|