Stored Procedures

Top Previous Topic Next Topic  Print this topic

Stored procedure elements are used to invoke a stored procedure from a database. In a database management system, a stored procedure is a set of Structured Query Language (SQL) statements with an assigned name, that's stored in the database in compiled form so that it can be shared by a number of programs.

A stored procedure element used by Data Architect consists of one stored procedure containing one or more SQL queries, the tabular data to be queried for output, one or more named input parameters and one or more returned values.

 

The following sample describes a Microsoft SQL Server stored-procedure named GetEmployees:

 

spds1

 

In this example, dbo.GetEmployees has:

- one input parameter (minRatingLevel);

- multiple output fields: a return value (RETURN_VALUE) and 2 cursors (Table: 1 and Table: 2).