Is there any way to move an column in an Oracle table from last to first position? Someone has dropped the ID column, and recreated it. So now it is at the end, which is a p
In Oracle 12c it is now easier to rearrange columns logically. It can be achived by making column invisible/visible.If you change a invisible column to visible , the column will appear last in the odering.
Consider Using Invisible Columns
Create wxyz table:
CREATE TABLE t (
w INT,
y VARCHAR2,
z VARCHAR2,
x VARCHAR2
);
rearrange the x column to the middle:
ALTER TABLE wxyz MODIFY (y INVISIBLE, z INVISIBLE); ALTER TABLE wxyz MODIFY (y VISIBLE, z VISIBLE);
DESCRIBE wxyz;
w
x
y
z