是不是你看花眼了?你建表的字段顺序是:c2000 c4000 c4001 create table test(c2000 varchar2(2000), c4000 varchar2(4000), c4001 varchar2(4000))写记录用的顺序是:c4000, c4001, c2000
insert into test(c4000, c4001, c2000) values查询select * from test会按c2000 c4000 c4001 ,当然会顺序不一样喽。
insert into test(c4000, c4001, c2000) values查询select * from test会按c2000 c4000 c4001 ,当然会顺序不一样喽。
...
for(int i = 0; i < 300; i++) {
c2000 += "A";
}
for(int i = 0; i < 1000; i++) {
c4000 += "B";
c4001 += "C";
}
...
结果:
SQL> select substr(c2000,1,10), substr(c4000,1,10),substr(c4001,1,10) from test
2 ;SUBSTR(C20 SUBSTR(C40 SUBSTR(C40
---------- ---------- ----------
AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC
for(int i = 0; i < 2000; i++) {
c2000 += "A";
}
for(int i = 0; i < 4000; i++) {
c4000 += "B";
c4001 += "C";
}
试一下吧 。