select length(字段名) from table;
select lengthb(字段名) from table;
两种方式有点区别的,用汉字试一试,就知道区别了

解决方案 »

  1.   

    不明白:
    SQL> desc test;
     名称                                      空?      类型
     ----------------------------------------- -------- --------------
     COL                                                VARCHAR2(4)SQL> select * from test;COL
    ----
    a
    人SQL> select length(col) from test;LENGTH(COL)
    -----------
              1
              1SQL> select lengthb(col) from test;LENGTHB(COL)
    ------------
               1
               2SQL> alter table test modify (col char(4));表已更改。SQL> select length(col) from test;LENGTH(COL)
    -----------
              4
              3SQL>  select lengthb(col) from test;LENGTHB(COL)
    ------------
               4
               4