首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

小弟我这个sql错在那里

2012-04-01 
我这个sql错在那里 ,求救updateabitsetsubstr(trim(abit.name),0,2)大大wheresubstr(trim(abit.name),0,2

我这个sql错在那里 ,求救
update   abit
      set   substr(trim(abit.name),   0,   2)   =   '大大 '
  where   substr(trim(abit.name),0,2)= '小小 '

表abitname字段存放的汉字比较长    
报错误ora-00927   :缺少等号

[解决办法]
update abit
set substr(trim(abit.name), 0, 2) = '大大 '//这有错
where substr(trim(abit.name),0,2)= '小小 '

你要么abit.name = '大大 ',
要么abit.name = '大大 '||substr(trim(abit.name), 0, 2)

热点排行