如上

解决方案 »

  1.   

    select max(to_number(id)) from table
      

  2.   

    varchar不能用max、sum之类的吧,要么改类型,要么如1楼
      

  3.   

    你这里id为varchar,只能由数字组成,否则to_number是不起作用
      

  4.   

    -- Create table
    create table AA
    (
      A VARCHAR2(11)
    )
    tablespace RORO
      pctfree 10
      initrans 1
      maxtrans 255
      storage
      (
        initial 64K
        minextents 1
        maxextents unlimited
      );select MAX(to_number(A)) from aa t;21