我应该将HTML存储为nvarchar(MAX)还是ntext? [英] Should I store HTML as nvarchar(MAX) or ntext?
本文介绍了我应该将HTML存储为nvarchar(MAX)还是ntext?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我选择nvarchar(MAX),我不知道字符数是否有限制,我不知道我需要多少字符。
这里使用的标准数据类型是什么?我使用的是SQL Server 2008 R2
解决方案
ntext
已弃用, text
和 image
。 Microsoft建议将它们替换为 nvarchar(max)
, varchar(max)
和 varbinary )
。
使用 nvarchar(max)
参考:
I don't know if there's a limit to the number of characters if I choose nvarchar(MAX), and I'm not sure how many characters I would need anyways.
What's the standard data type to use here? I'm using SQL Server 2008 R2
解决方案
The ntext
type is deprecated, as are text
and image
. Microsoft recommends replacing them with nvarchar(max)
, varchar(max)
and varbinary(max)
respectively.
Use nvarchar(max)
, therefore.
Reference:
这篇关于我应该将HTML存储为nvarchar(MAX)还是ntext?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文