表中的原始数据正在被更改是非常值得怀疑的。由于您的某些 cmets 暗示您正在使用 SQLPlus 以外的工具和应用程序来查看和处理数据,因此我认为您需要查看它们是否以某种方式错误处理了数据。
这是一个示例,我试图重现您在直接 SQLPlus 中所做的事情。没有空字节附加到现有数据:
SQL> create table foo (bar varchar2(8));
Table created.
SQL> insert into foo
2 select lpad(to_char(level),level)
3 from dual
4 connect by level <=8;
8 rows created.
SQL> commit;
Commit complete.
SQL> select bar,dump(bar) from foo;
BAR
--------
DUMP(BAR)
--------------------------------------------------------------------------------
1
Typ=1 Len=1: 49
2
Typ=1 Len=2: 32,50
3
Typ=1 Len=3: 32,32,51
4
Typ=1 Len=4: 32,32,32,52
5
Typ=1 Len=5: 32,32,32,32,53
6
Typ=1 Len=6: 32,32,32,32,32,54
7
Typ=1 Len=7: 32,32,32,32,32,32,55
8
Typ=1 Len=8: 32,32,32,32,32,32,32,56
8 rows selected.
SQL> alter table foo modify (bar varchar2(16));
Table altered.
SQL> select bar,dump(bar) from foo;
BAR
----------------
DUMP(BAR)
--------------------------------------------------------------------------------
1
Typ=1 Len=1: 49
2
Typ=1 Len=2: 32,50
3
Typ=1 Len=3: 32,32,51
4
Typ=1 Len=4: 32,32,32,52
5
Typ=1 Len=5: 32,32,32,32,53
6
Typ=1 Len=6: 32,32,32,32,32,54
7
Typ=1 Len=7: 32,32,32,32,32,32,55
8
Typ=1 Len=8: 32,32,32,32,32,32,32,56