请问:sql server 2000中的Text类型的问题

andevele 2008-04-07 04:39:04

就是想存类似于新闻的内容,就比如新浪的某条新闻的内容

中文字比如在1万字左右 我应该怎么办呢

从来没有用到过这样的类型,还有就是我建立text型的时候默认的大小是16

我也没动 想修改这个数值,也不能,不知道这是我为什么?我也不知道这个16是什么意思 多大?

16W个字 还是有16个字啊 希望大家告诉 非常感谢
...全文
247 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
-狙击手- 2008-04-07
  • 打赏
  • 举报
回复
看这个,有详细介绍


http://blog.csdn.net/happyflystone/archive/2008/04/03/2246960.aspx
-狙击手- 2008-04-07
  • 打赏
  • 举报
回复
16 是文件指针
wangxuelid 2008-04-07
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 pt1314917 的回复:]
SQL code

--修改text类型字段的值:
create table os(SoftIntro text,ID int)
insert into os
select 'aaa',1004
union all
select 'bbb',1003
union all
select 'ccc',1002


declare @ptr binary(16)
select @ptr=textptr(SoftIntro) from os where id=1002
updatetext os.SoftIntro @ptr null 0 'dddd'
select * from os
[/Quote]--ntext/text这个东西不好搞,,
ojuju10 2008-04-07
  • 打赏
  • 举报
回复
text

服务器代码页中长度可变的非 Unicode 数据,最大长度为 2^31-1 (2,147,483,647) 个字符。当服务器代码页使用双字节字符时,存储仍是 2,147,483,647 字节。根据字符串,存储大小可能小于 2,147,483,647 字节。
ojuju10 2008-04-07
  • 打赏
  • 举报
回复

默认是16不能改的
pt1314917 2008-04-07
  • 打赏
  • 举报
回复


--修改text类型字段的值:
create table os(SoftIntro text,ID int)
insert into os
select 'aaa',1004
union all
select 'bbb',1003
union all
select 'ccc',1002


declare @ptr binary(16)
select @ptr=textptr(SoftIntro) from os where id=1002
updatetext os.SoftIntro @ptr null 0 'dddd'
select * from os

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧