To restore the unused field, follow these steps ).
1. Create an experiment table ttta
SQL> Create Table ttta (a integer, B integer, C varchar2 (10), d integer );
The table has been created.
SQL> insert into ttta values (1, 2, '3', 4 );
One row has been created.
SQL> insert into ttta values (2, 3, '4', 5 );
One row has been created.
SQL> commit;
Submitted.
Alter table ttta set unused column C; set the c field in the ttta table to unavailable
2. perform the following restoration:
Log on as an administrator. Oracle is the password set when Oracle10g is installed.
SQL> conn sys/Oracle AS sysdba
Find the ID allocated by ttta in the database
SQL> select OBJ # From OBJ $ where name = 'ttta ';
OBJ #
----------
32067
Select Col #, intcol #, name from Col $ where OBJ # = 32067;
Col # intcol # Name
--------------------------------------------------
1 1
2 2 B
0 3 sys_c1_3_08031720: 09: 55 $ unused Field
3 4 d
SQL> select Cols from tab $ where OBJ #= 32067;
Cols
----------
3 ------ the number of fields has changed to 3
SQL> Update Col $ set Col #= intcol # Where OBJ #= 32067;
Four rows have been updated.
SQL> Update Tab $ set Cols = Cols + 1 where OBJ #= 32067;
1 row updated.
Update Col $ set name = 'C' where OBJ #= 32067 and Col # = 3;
Update Col $ set property = 0 where OBJ # = 32067;
SQL> commit; -- submit the transaction to make the previous operations take effect.
3. Restart the database
SQL> select * from Scott. ttta;
A B c d
----------------------------------------
1 2 3 4
2 3 4 5
Recovery completed