
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:
- Use the Procedure tool in the diagram Palette
- Open the Procedures tab in the property sheet of a table, and click the Add a Row tool
- Select Model→Procedures to access the List of Procedures, and click the Add a Row tool
- Right-click the model or package in the Browser, and select New→Procedure
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.
To create a procedure:
- Double-click a table symbol to open its property sheet, and then click the Procedures tab.
- Click the Add a Row tool to create a new procedure, and type a name and code.
- Click Apply to commit the creation of the new procedure, and then click the Properties tool to open its property sheet.
- Click the Definition tab:
- [optional] Select a procedure template from the Template list (see Procedure Templates (PDM)).
- 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).
- You can also modify the procedure's other properties. For a full list of the properties available, see Procedure properties.
- Click OK in each of the dialog boxes.
Copyright (C) 2006. Sybase Inc. All rights reserved.
|
|