Creating a Database View

Create a database view to see a subset of rows or columns from one or more tables. Each time you select a database view and use the view data, Sybase WorkSpace executes a select statement to retrieve the data and creates the database view.

Prerequisites 

Before you can create a database view, be sure the data server for which you are creating a view is running, and you created and established a connection to the data server.

  1. In Enterprise Explorer, right-click the Views folder and select New > View .
  2. Select the tables you want to include in the view and click Open.
  3. Click to select the columns in each table that you want included in the SELECT statement for the view, then click OK.
  4. Limit or sort the result set.
    • Select View > Sort to indicate the display order for the selected columns.
    • Select View > Where to to specify the criteria to limit the retrieved rows.
    • Select View > Group to group the retrieved rows.
    • Select View > Having to limit the retrieved groups.
    • Select View > Compute to create computed columns.
  5. When you have completed the view, click OK.
  6. Name the view and click Create.

    The view opens in the View Editor.


Created June 25, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com