oracle中好像不太容易改变字段的位置。在toad或pl/sql工具中只能在查询结果集显示中将字段进行调整,但也不能改变数据在oracle中实际存储的顺序。(事实证明也没有非要把新加的字段插入在某字段之前的必要,很多时候这种问题可以在select的时候手写字段顺序来解决,比如你可以写select a,c,b from table1,而且这种查询效率要优于select * from table1)
解决的办法一是把建新表,再把原表删掉:
alter table table1 add c varchar2(10);
create table table2 as select a,c,b from table1;
drop table table1;
办法二是建一个视图,在视图里按自己的意愿排序:
alter table table1 add c varchar2(10);
create view table1_view as select a,c,b from table1;