如果头尾空格就可以用这样的方法简单去掉
update table
set name =ltrim(rtrim(name))