--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
create table quzg as select * from baby; insert into quzg select * from baby ;
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
insert into quzg select * from baby
;