Chapter 6 Building Triggers and Procedures


Creating a stored procedure or function

You can create a stored procedure or function in any of the following ways:

For general information about creating objects, see the chapter "Getting Started with PowerDesigner" in the General Features Guide .

You can create a procedure based on one of the PowerDesigner templates or on a template of your own.

Steps To create a procedure:

  1. Double-click a table symbol to open its property sheet, and then click the Procedures tab.
  2. Click the Add a Row tool to create a new procedure, and type a name and code.
  3. Click Apply to commit the creation of the new procedure, and then click the Properties tool to open its property sheet.
  4. Click the Definition tab:
  5. [optional] Select a procedure template from the Template list (see Procedure Templates (PDM)).
  6. Modify the procedure definition code. You can use PDM variables and macros and various other tools available from the toolbar (see SQL Code Definition Toolbars).
  7. You can also modify the procedure's other properties. For a full list of the properties available, see Procedure properties.
  8. Click OK in each of the dialog boxes.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.