update

jiaguwen123 2009-04-01 07:10:54
好,请问使用update a set a.name = '国' from a,b where a.pro like b.pro'%' 更新a.pro右匹配b.pro的数据,为什么不行?要怎样修改才正确?
...全文
62 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lihan6415151528 2009-04-01
  • 打赏
  • 举报
回复

update a set a.name = '国' from a,b where a.pro like b.pro+'%'
ks_reny 2009-04-01
  • 打赏
  • 举报
回复

update a
set a.name = '国'
from a,b
where charindex(b.pro,a.pro)>0'
yangqidong 2009-04-01
  • 打赏
  • 举报
回复

update a set a.name = '国'
from a inner join b on charindex(a.pro,b.pro)=1

百年树人 2009-04-01
  • 打赏
  • 举报
回复
update a 
set a.name = '国'
from a,b
where a.pro like b.pro+'%'

--或者

update a
set a.name = '国'
from a,b
where charindex(b.pro,a.pro)>0'
  • 打赏
  • 举报
回复
update a set a.name = '国' from a,b where a.pro like b.pro+'%'
rucypli 2009-04-01
  • 打赏
  • 举报
回复
update a set a.name = '国'
from a,b
where charindex(a.pro,b.pro)>0
htl258_Tony 2009-04-01
  • 打赏
  • 举报
回复
update a set a.name = '国' from a,b where a.pro like b.pro+'%'
yangqidong 2009-04-01
  • 打赏
  • 举报
回复
update a
from a inner join b on charindex(a.pro,b.pro)=1
set a.name = '国'
you_tube 2009-04-01
  • 打赏
  • 举报
回复
b.proc + '%'

22,210

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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