Specifying Parameters

A stored procedure communicates with the calling program through its parameters. When a program executes a stored procedure, it can pass values to the stored procedure through the parameters of the stored procedure. These values can be used as standard variables in the Transact-SQL programming language. The stored procedure can also return values to the calling program through OUTPUT parameters. A stored procedure can have as many as 2100 parameters, with each parameter having a name, data type, direction, and default value.

In This Section

Topic Description

Specifying a Parameter Name

Describes how to name parameters.

Specifying a Parameter Data Type

Describes the data types that can be assigned to stored procedure parameters.

Specifying the Direction of a Parameter

Describes input and output parameters.

Specifying a Parameter Default Value

Describes how default values can be specified for parameters.

See Also

Concepts

Creating Stored Procedures (Database Engine)

Help and Information

Getting SQL Server 2005 Assistance