首页 新闻 会员 周边

用什么数据类型来存储像知乎这样的长回答?

1
[已解决问题] 解决于 2017-05-03 17:19

想做一个像知乎这样的论坛,想请教各位大神除了用text类型的数据还能用什么方法来存储像知乎这样的长回答的数据。

< >
分享
最佳答案
0

text就可以吧。

奖励园豆:5
1sa2sa | 菜鸟二级 |园豆:289 | 2017-05-03 17:14
其他回答(1)
0

sqlserver后面的版本好像varchar可以一直放到max(等价于int.max字节了,这个不确定)

Daniel Cai | 园豆:10424 (专家六级) | 2017-05-03 17:13

最大是8000,好像是只有text适合一点,谢谢。

支持(0) 反对(0) flying_fish | 园豆:202 (菜鸟二级) | 2017-05-03 17:18

@flying_fish: 

varchar [ ( n | max ) ]
Variable-length, non-Unicode string data. n defines the string length and can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size is the actual length of the data entered + 2 bytes.

支持(0) 反对(0) Daniel Cai | 园豆:10424 (专家六级) | 2017-05-03 18:41
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册