我想把数据库中某一个字段后都加几个字符,比如加入用括号括起来的江苏省,编写一下语句后提示错误。
update table set column1 = column1 + "(江苏省)";

解决方案 »

  1.   

    update table set column1 = column1 || '(江苏省)';
      

  2.   

    正解
    还可以这样子UPDATE table SET column1=CONCAT(column1,'(江苏省)');
      

  3.   

    在oracle中连接符用||,字符串用单引号
    update table set column1 = column1 ||'(江苏省)';
      

  4.   


    你这是sqlserver的写法吧!oracle里面这么写的 :update table set column1 = column1||'(江苏省)';
      

  5.   

    正解,恭喜LZ向oracle更进一步!
      

  6.   

    update table set column1 = column1 + "(江苏省)";
      

  7.   

    concat是字符间用“,”隔开的,而||是字符串间的无缝连接