是不是你看花眼了?你建表的字段顺序是: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 ,当然会顺序不一样喽。

解决方案 »

  1.   

    楼上说的有理用select c4000,c4001,c2000 from test看一下。
      

  2.   

    楼主在开玩笑?
    ...
    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
      

  3.   

    有这种问题oracle就应该关门了
      

  4.   

    我用update props$ set value$='UTF8' where name='NLS_CHARACTERSET';执行后,发现没有排序错误问题。但是发现在ORACLE816中,Can not insert two long data into table with two varchar2 dataType column!所以,大家可以这样:
    for(int i = 0; i < 2000; i++) {
      c2000 += "A";
    }
    for(int i = 0; i < 4000; i++) {
      c4000 += "B";
      c4001 += "C";
    }
    试一下吧 。