Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the max number of parameters that can be passed in stored procedure

Server in qustion is SQL Server 2008.

On the same note, I need to know what is the max length of the string parameter passed in SP?

like image 500
epitka Avatar asked Aug 19 '09 12:08

epitka


2 Answers

According to MSDN, SQL Server limits the number of parameters per stored procedure to 2,100.

like image 100
Andrew Hare Avatar answered Oct 05 '22 16:10

Andrew Hare


What is the max number of parameters that can be passed in stored procedure?

A: 2100 - link shamelessly stolen from Andrew's answer.

On the same note, I need to know what is the max length of the string parameter passes in SP?

You can use VARCHAR(MAX)/NVARCHAR(MAX) datatype, it can store up to 2 GB of data.

like image 22
Kirtan Avatar answered Oct 05 '22 16:10

Kirtan