表A字段有uid,uname,upwd,code。其中code为a-z这些字母的组合,怎么在第三个字母后插入个a字母??请教

解决方案 »

  1.   

    update a set code= substr(code,1,3)||'a'||substr(code,4)
      

  2.   

    update 表名 set code = substr(code,1,3)||'a'||substr(code,1,4)
      

  3.   


    你这个是错的,这个得到的结果是什么:code的前3位+a+code的前4位
      

  4.   

    可怎么用update a set code= substr(code,1,3)||'a'||substr(code,4)在MySQL中code的值为都变为1了啊??
      

  5.   


    MYSQL数据库,估计是SUBSTR函数支持的问题,我在ORACLE中测试都没问题的
      

  6.   

    恩,在Oracle中是好用,可现在我需要用Mysql,该怎么写?拜托了!!
      

  7.   

    update tb set code=substr(code,1,3)||'a'||substr(code,4)
      

  8.   

    Update tablename Set code = substr(code,1,3)||'a'||substr(code,4);
      

  9.   

    MYSQL数据库,你到这里发帖干吗呀
      

  10.   


    --这样
    update a set code=concat(substr(code,1,3),'a',substr(code,4))