char占用空间长度已在设计表结构定义了长度,是不动态变动的,不会出现你那种情况!SQL> desc student; Name Type Nullable Default Comments ----- ------------ -------- ------- -------- ID NUMBER Y SNAME VARCHAR2(20) Y BOOK VARCHAR2(20) Y FIRST CHAR(6) Y ' ' SQL> select nvl(first,'null') from student where rownum=1;NVL(FIRST,'NULL') ----------------- SQL> select length(first) from student where rownum=1;LENGTH(FIRST) ------------- 6SQL> select nvl(book,'null') from student where rownum=1;NVL(BOOK,'NULL') -------------------- nullSQL> select length(book) from student where rownum=1;LENGTH(BOOK) ------------
Name Type Nullable Default Comments
----- ------------ -------- ------- --------
ID NUMBER Y
SNAME VARCHAR2(20) Y
BOOK VARCHAR2(20) Y
FIRST CHAR(6) Y ' ' SQL> select nvl(first,'null') from student where rownum=1;NVL(FIRST,'NULL')
----------------- SQL> select length(first) from student where rownum=1;LENGTH(FIRST)
-------------
6SQL> select nvl(book,'null') from student where rownum=1;NVL(BOOK,'NULL')
--------------------
nullSQL> select length(book) from student where rownum=1;LENGTH(BOOK)
------------