Learn More About Procedural Objects

Stored procedures and triggers standardize actions performed by more than one application program. By coding the action once and storing it in the database for future use, applications need only execute the procedure or fire the trigger to achieve the desired result repeatedly. And since changes occur in only one place, all applications using the action automatically acquire the new functionality if the implementation of the action changes. When you create a procedure or trigger, it is automatically checked for correct syntax, and then stored in the system tables. The first time any application calls or fires a procedure or trigger, it is compiled from the system tables into the server's virtual memory and executed from there. User-defined functions and event handlers are similar to stored procedures with the differences noted below.

Note

You can develop the procedural objects your server type supports.

Procedural objects you can develop for each server type

Procedural objectAdaptive Server EnterpriseAdaptive Server AnywhereSybase IQ
stored procedures

Yes

Yes

Yes

triggers

Yes

Yes

event handlers

Yes

Yes

user-defined functions

Yes

Yes, though performance considerations may apply

Note

Use the Adaptive Server Anywhere help topics and cheat sheets to develop procedural objects for Sybase IQ.

For more information on user-defined functions and event handlers, see the Adaptive Server Anywhere documentation in the Sybase WorkSpace Server Administration collection.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com