您好,登錄后才能下訂單哦!
Exception: Too many parameters were provided in this RPC request. The maximum is 2100.
[Microsoft][SQL Native Client][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
SQL語句的報錯
如果是SELECT查詢OR條件語句形如:SELECT * FROM tablename WHERE x1 OR x2 OR x3 OR x4 OR ... OR x2101,OR條件個數(shù)超過2100就會報錯,可以改為UNION ALL。
如果是SELECT查詢IN條件語句形如: SELECT * FROM tablename WHERE columnname IN (1,2,3,4,5, ........ , 2101 ),IN參數(shù)個數(shù)超過2100,會報上面的錯誤??梢詣?chuàng)建臨時表,將這些數(shù)據(jù)寫入臨時表,再關(guān)聯(lián)。
--Create new table Create Table temp (myvalues uniqueidentifier) -- Join new table with your table SELECT t1.* FROM tablename t1 JOIN temp t2 ON t1.myvalues = t2.myvalues
存儲過程和函數(shù)的報錯
對于存儲過程和函數(shù),參數(shù)最大個數(shù)為2100
參見如下限制:
https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。