漏了字符,更正如下update ExpertsData set country=right(address,charindex(',',reverse(address))-1)
估计是有的数据没有,号 update ExpertsData set country=right(address,charindex(',',reverse(address))-1) where charindex(',',address)<>0 没有,号的数据如果就是国家 update ExpertsData set country=address where charindex(',',address)=0
update ExpertsData set
country=right(address,charindex(',',reverse(address))-1)
where charindex(',',address)<>0
没有,号的数据如果就是国家
update ExpertsData set
country=address
where charindex(',',address)=0