本帖最后由 cartersyc 于 2009-09-21 14:38:01 编辑

解决方案 »

  1.   

    alter table table1 已解决,使用update即可
      

  2.   

    update table1 set compid=compid/10 where compid>20000
    这样?
      

  3.   


    SQL> select substr('23000',1,4) from dual;SUBSTR('23000',1,4)
    -------------------
    2300SQL> select substr(to_char(23000),1,4) from dual;SUBSTR(TO_CHAR(23000),1,4)
    --------------------------
    2300SQL> 
      

  4.   

    alter 是改变表结构的,不是更新表中的数据的
      

  5.   

    是不是,是字符类型的呀,如果是字符类型的可以update table1 set compid=substr(compid, 1, length(compid)-1) where compid>'20000'