Lesson 1: View an existing trigger

In this lesson, you will use Sybase WorkSpace to view an existing trigger in the titles table in the interpubs database.

  1. In Sybase WorkSpace, select Window|Open Perspective|Database Development from the main menu bar to open the Database Development perspective.

  2. In the Database Explorer view, expand the contents under the ASE_Tutorials connection profile that you created during the setup process.

    In the Database Explorer view, you can view the contents of each database on the server by expanding the underlying folders.

  3. In the Database Explorer view, expand the Tables folder under the sample pubs database that you installed during the tutorial setup process.

    Triggers reside with their corresponding table. Expand the titles table folder and the Triggers folder under that. Look for the deltitle trigger.

  4. In the Database Explorer view, double-click the deltitle trigger.

    The SQL Editor displays the trigger code.

    You can change the code of any trigger, then save it to the server by right-clicking anywhere in the SQL Editor window and selecting Save to Server from the context menu.

  5. Select File|Close on the main menu bar to close the SQL Editor.