Drawing stored procedures
Stored Procedure is a set of Structured Query Language (SQL) statements with an assigned procedure name that’s stored in the database in compiled form and is part of a relational database.
Creating stored procedures shape
Click Stored Procedures from diagram toolbar and drag it on the diagram pane.

|
Create stored procedure shape
|
Specify the name for the newly created stored procedures and press Enter.

|
Rename procedure shape
|
| NOTE: |
Procedure shape is a virtual container to group a set of stored procedures. It is not a stored procedure.
|
Creating procedure
Right click on the stored procedures and select New Procedure from the pop-up menu, or press Alt+Shift+P.

|
Create stored procedure
|
After the new procedure is created, right click on it and select Open Specification... from the pop-up menu. In Procedure Specification dialog box, specify the create statement and create parameters if necessary.

|
Specify create statement in Procedure Specification dialog box
|
Moving or duplicating a procedure to another procedure container
- Select the procedure to move or duplicate.

|
Select procedures to move or duplicate
|
- Drag over the target procedure container.

|
Drag procedure towards the target procedures container
|
- If you want to duplicate the procedures, press on the Ctrl key and release the mouse button. If you want to move them from source to target procedure container, just release the mouse button.

|
Procedures are moved
|
Creating stored procedure resultSet
Click Stored Procedure ResultSet from diagram toolbar and drag it on the diagram pane.

|
Create stored procedure resultset
|
After specify the name for the newly created resultset, press Enter.

|
Rename stored procedure resultset
|
The way of creating resultset column is the same as creating entity column.
Right click on the procedure that created above, select Open Specification... from the pop-up menu. In Procedure Specification dialog box, specify stored procedure return resultset.

|
Specify stored procedure return resultset
|