开发者

Boundless Stored Proceedure Input

I'm passing a comma delimited list of ids to a stored procedure as a varchar(MAX). The problem is varchar caps at 8000 characters and the list could potentially be larger.

Is there a sql datatype where size doesn开发者_Go百科't matter? No pun intended.


varchar(MAX) does not cap at 8000 characters. It's a replacement for the text data type (which is now deprecated). The MAX is not just a shortcut for a constant value of 8000; it actually indicates that the variable should be able to store an arbitrarily large amount of data.

If you're declaring a varchar variable without MAX as the qualifier, though, it will cap at 8000.


No, varchar(MAX) is NOT limited to 8000 characters, so you'll be fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜