Creating a View

In Interactive SQL, you can use a CREATE VIEW statement to create and store a view.

This example creates a view called emp_dept in iqdemo:

CREATE VIEW emp_dept AS
  SELECT Departments.DepartmentID,
  Departments.DepartmentName, Employees.EmployeeID,
  Employees.GivenName,Employees.Surname,
  Employees.Phone
FROM Departments, Employees
ORDER BY Employees.State

In Sybase Central, you can use a wizard to create a view. To start the wizard, connect to iqdemo, right-click Views, point to New, choose View. When the wizard starts, follow the instructions on the screen.