开发者

suitable data type to save string larger than 8000 charachter

what is the suitable data type to save string more than开发者_Python百科 8000 character in SQL database?


For SQL Server 2005+ varchar(max) or nvarchar(max) depending on whether you need to save as unicode or not.

If you don't have this requirement (or anticipate ever needing it) the varchar option is more space efficient.

You don't give a specific version of SQL Server in your question. Pre 2005 it would have been the text datatype.

NB: In answer to your comment use 'varchar(max)' exactly as written. Don't substitute a number in for "max"!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜