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. This means that creating a view does not require storing duplicate data in the database.
To create a new regular view (Sybase Central)
Connect to the database as a user with DBA authority.
In the left pane, right-click Views and choose New » View.
Follow the instructions in the Create View Wizard.
In the right pane, click the SQL tab to edit the view definition. To save your changes, choose File » Save.
Create a view called DepartmentSize that contains the results of the SELECT statement given earlier in this section:
CREATE VIEW DepartmentSize AS SELECT DepartmentID, COUNT(*) FROM Employees GROUP BY DepartmentID; |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |