开发者

suitable data type to save string larger than 8000 charachter

开发者 https://www.devze.com 2022-12-31 02:01 出处:网络
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 unic

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

精彩评论

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

关注公众号