NVARCHAR(MAX) 的最大字符数是多少? [英] What is the maximum characters for the NVARCHAR(MAX)?
问题描述
我在 SQL Server 2008 中声明了一个 NVARCHAR(MAX)
类型的列,以 MAX 为长度的它的确切最大字符数是多少?
I have declared a column of type NVARCHAR(MAX)
in SQL Server 2008, what would be its exact maximum characters having the MAX as the length?
推荐答案
NVARCHAR(MAX)
类型的列的最大大小为 2 GB 的存储空间.
The max size for a column of type NVARCHAR(MAX)
is 2 GByte of storage.
由于 NVARCHAR
每个字符使用 2 个字节,因此大约为 2 个字节.10 亿个字符.
Since NVARCHAR
uses 2 bytes per character, that's approx. 1 billion characters.
Leo Tolstoj 的战争与和平是一本 1'440 页的书,包含大约 600'000 个单词 - 所以可能有 600 万个字符 - 很好地四舍五入.因此,您可以在每个 NVARCHAR(MAX)
列中粘贴整本 War and Peace 的大约 166 份副本.
Leo Tolstoj's War and Peace is a 1'440 page book, containing about 600'000 words - so that might be 6 million characters - well rounded up. So you could stick about 166 copies of the entire War and Peace book into each NVARCHAR(MAX)
column.
空间是否足够满足您的需求?:-)
Is that enough space for your needs? :-)
这篇关于NVARCHAR(MAX) 的最大字符数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!