oracle调整列顺序

select *
from all_objects
where 1=1
and owner = 'owner'
and object_name = 'table_name'; --172600

select obj#, col#, name
from sys.col$
where obj# = '172600' order by col#


update sys.col$ set col#=1 where obj#=172600 and name='col_name';
update sys.col$ set col#=2 where obj#=172600 and name='col_name';
update sys.col$ set col#=3 where obj#=172600 and name='col_name';
update sys.col$ set col#=4 where obj#=172600 and name='col_name';
update sys.col$ set col#=5 where obj#=172600 and name='col_name';
update sys.col$ set col#=6 where obj#=172600 name='col_name';
commit;

posted @ 2021-12-07 11:22  AKX  阅读(488)  评论(0编辑  收藏  举报