请教一个简单的截取更新 我本来想更新一个字段:我是这样写的:update a set substring(a.x,1,1)='T'where 条件我只是想把第一个字母修改了,但是这样写报错,请问这是什么原因,谢谢大家 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 本帖最后由 roy_88 于 2011-10-17 10:55:16 编辑 函数搞错了,谢谢,不过我一般用的是SUBSTRING update a set x='T'+right(x,len(x)-1)where 条件 update a set x = substring(a.x,1,1)='T'where 条件 update a set x = 'T'+substring(a.x,2,len(a.x))where 条件或right都可以實現 update a set x = substring(a.x,1,1)='T'where 条件 update a set x ='T'+ right(a.x,len(a.x)-1)where 条件 update a set x = 'T'+substring(a.x,2,len(a.x))where 条件 update a set x = 'T'+substring(a.x,2,len(a.x))where x>'' and 其他条件 update a set x = 'T'+right(x,len(x)-1)where x>'' and 其他条件 个人习惯还是喜欢这样写:update a set x = 'T'+substring(a.x,2,len(a.x))where 条件 从数据表中提取两列放到dataset里 嵌套查询与连接查询的相互转换问题 根据某个字段的来决定update的值 如何用SQL语句更改一张表的列名?? sql server 2008安装失败 怎么样统计所有物品的销售量? 请教一个数据库连接问题。 怎么配置本地db2数据库得客户端! 请教visual foxpro问题 怎么检测第三方提供的数据接口中那几条记录被更新?? SQL2008中用script怎样在指定位置插入列 继续问一个更新的问题
update a
set x='T'+right(x,len(x)-1)
where 条件
update a
set x = substring(a.x,1,1)='T'
where 条件
update a
set x = 'T'+substring(a.x,2,len(a.x))
where 条件或right都可以實現
set x = substring(a.x,1,1)='T'
where 条件
set x ='T'+ right(a.x,len(a.x)-1)
where 条件
set x = 'T'+substring(a.x,2,len(a.x))
where 条件
set x = 'T'+substring(a.x,2,len(a.x))
where x>'' and 其他条件
set x = 'T'+right(x,len(x)-1)
where x>'' and 其他条件
update a
set x = 'T'+substring(a.x,2,len(a.x))
where 条件