set SERVEROUTPUT ON declare v_char char(10); v_varchar2 varchar2(10); begin v_char:='java'; v_varchar2:='java'; DBMS_OUTPUT.PUT_LINE('CHAR LENGTH IS '||LENGTH(v_char)); DBMS_OUTPUT.PUT_LINE('VARCHAR LENGTH IS '||LENGTH(v_varchar2)); END; PL/SQL 过程已成功完成。 PL/SQL 过程已成功完成。 CHAR LENGTH IS 10 VARCHAR LENGTH IS 4