Managing views with Sybase Central

The Add View Wizard includes an optional template for view creation.When you open the Views container, the template functionality becomes available.

StepsDefining a view

  1. Expand the server and database containers, then click the Views folder.

  2. Click the New View toolbar button Shown is the new view toolbar buttonor Alt+F, N, V.

  3. Type the view name in the text box. For this tutorial, use EMP_DEPT.

  4. Select the view’s owner from the dropdown menu. For this tutorial, choose DBA.

  5. Choose the option to use the View Creation wizard or a template. Choose the wizard. Click Next.

  6. Type the SELECT statement to create the view. For example:

    CREATE VIEW “DBA”.”emp_dept”(/* view column name,...*/)
    AS SELECT “department”.”dept_id”,
    “department”.”dept_name”,”employee”.”emp_id”,
    ”employee”.”emp_fname”,”employee”.”emp_lname”,
    ”street”,”employee”.”city”,”employee.state”,
    ”employee.phone”,
    FROM “DBA”.”department”,”DBA”.”employee”
    
  7. Select File > Save View.

StepsBrowsing view data

  1. Run Interactive SQL.

  2. Type a select statement in the format:

    select * from <owner>.<view>
    

    For example

    SELECT * FROM “DBA”.”emp_dept”
    

You can access the results from Sybase Central Java Edition using File > View data in Interactive SQL.