sql语句 select caset when charindex('-',Tel)>0 then Tel else '0510-'+right(Tel,len(TEL)-4) end from YourTable 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update table set telephone=replace(telephone,'0510','0510-') where left(telephone,4)='0510' and left(telephone,5)<>'0510-'感觉这个方法好! update set 列=left(列,4)+'-'+right(列,7) where len(列)=11 怎么改名了?是小干部有心上人了吧!haha.. update t set Col=left(Col,4)+'-'+right(Col,len(Col)-4)where left(Col,4)='0510' and right(left(Col,5),1)<>'-'select * from t 求一SQL语句 请问我这条语句错在哪里? 按照时间段 多表查询 库存数量,该怎样做 sql语法错误 要怎么修改 <進倉-出倉=庫存> 怎样删除数据库 sql server 内部ID 国庆之前最后一个问题!高手进,小菜问题 求救!!!help me!sql语句问题!!(急!) 随机取数据 急,sql2000的数据区不区分大小写? 请专家写出这样的sql查询语句,高分立即向送!!!
感觉这个方法好!
update t set Col=left(Col,4)+'-'+right(Col,len(Col)-4)
where left(Col,4)='0510' and right(left(Col,5),1)<>'-'select * from t