select cast(字段 as varchar)+'字符' from 表

解决方案 »

  1.   


    --参考下面这个 updatetext可以直接在text尾部追加数据的--text字段增加处理--创建测试表
    create table test(id varchar(3),detail text)
    insert into test
    select '001','A*B'--定义添加的的字符串
    declare @s_str varchar(8000),@postion int
    select @s_str='*C'  --要添加的字符串
    ,@postion=null --追加的位置,null 加在尾部,0 加在首部,其他值则加在指定位置--字符串添加处理
    declare @p varbinary(16)
    select @p=textptr(detail) from test where id='001'
    updatetext test.detail @p @postion 0 @s_str--显示处理结果
    select * from test
    go--删除测试表
    drop table test
      

  2.   

    text,ntext都可以。改一下即可!
      

  3.   

    ntext对中文处理,很不错,text用这种方法处理中文会出现编码错误!