第一种方法:
删除重建,但是这样会删除表中数据,可以建一个临时备份表,先将数据保存到临时表中,再删除重建目标表,然后再将临时表中的数据按字段顺序INSERT到新的表中。
第二种方法:
1.首先,用DBA用户登录。
2.select object_id fromm all_objects where owner = '用户名' and object_name = '表名';
查出需要更改字段顺序表的ID号
3.select obj#,col#,name from sys.col$ where obj# = 'ID号' order by col#;
通过2查出的ID号查出该表所有字段的顺序
4.update sys.col$ set col# = 2 where obj# = 'ID号' and name = '字段1';
update sys.col$ set col# = 3 where obj# = 'ID号' and name = '字段2';
将字段1调整到第二位,将字段2调整为第3位