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
the simplest way to modify the logical order of the columns of a table is to rename your table and create a view with the "right" column positions:
ALTER TABLE your_table RENAME TO your_table_t;
CREATE VIEW your_table AS SELECT <columns in the right order> FROM your_table_t;
-- grants on the view (the same as the table)
GRANT ** TO ** ON your_table;
Your application will behave as if the columns were in the "right" position. You don't have to touch at the physical structure.
The Oracle FAQ says:
Oracle only allows columns to be added to the end of an existing table.
You'd have to recreate your table.
RENAME tab1 TO tab1_old;
CREATE TABLE tab1 AS SELECT id, <the rest of your columns> FROM tab1_old;