So how about something like this ?
SQL>
SQL> create table t1 as
2 select OWNER, OBJECT_NAME, SUBOBJECT_NAME,
3 OBJECT_ID, DATA_OBJECT_ID, OBJECT_TYPE,
4 CREATED, LAST_DDL_TIME, TIMESTAMP, STATUS,
5 TEMPORARY, GENERATED, SECONDARY
6 from all_objects
7 where object_id is not null;
Table created.
SQL>
SQL> alter table t1
2 add constraint t1_pk
3 primary key(object_id);
Table altered.
SQL>
SQL> create table t2 as select object_id, owner||'.'||object_name fname
2 from all_objects
3 where object_id is not null;
Table created.
SQL>
SQL> alter table t2
2 add constraint t2_pk
3 primary key(object_id);
Table altered.
SQL>
SQL> alter table t1 add full_name varchar2(200);
Table altered.
SQL>
SQL> select object_id, owner, full_name from t1
2 where rownum < 10;
OBJECT_ID OWNER FULL_NAME
---------- ------------------------------ ------------------------------
30 SYS
47 SYS
32 SYS
49 SYS
17 SYS
2 SYS
29 SYS
45 SYS
10 SYS
9 rows selected.
So at this point I have table T1 with a new null column, and that value needs to come from table T2. I can simulate the join using a function
SQL> create or replace
2 function get_full(p_id int ) return varchar2 deterministic is
3 f varchar2(100);
4 begin
5 select fname
6 into f
7 from t2
8 where object_id = p_id;
9
10 return f;
11 end;
12 /
Function created.
SQL> create table t_interim (
2 owner varchar2(128),
3 object_name varchar2(128),
4 subobject_name varchar2(128),
5 object_id number,
6 data_object_id number,
7 object_type varchar2(23),
8 created date,
9 last_ddl_time date,
10 timestamp varchar2(19),
11 status varchar2(7),
12 temporary varchar2(1),
13 generated varchar2(1),
14 secondary varchar2(1),
15 full_name varchar2(200)
16 );
Table created.
SQL>
SQL>
SQL> declare
2 l_colmap varchar(512);
3 begin
4 l_colmap :=
5 'OWNER
6 ,OBJECT_NAME
7 ,SUBOBJECT_NAME
8 ,OBJECT_ID
9 ,DATA_OBJECT_ID
10 ,OBJECT_TYPE
11 ,CREATED
12 ,LAST_DDL_TIME
13 ,TIMESTAMP
14 ,STATUS
15 ,TEMPORARY
16 ,GENERATED
17 ,SECONDARY
18 ,get_full(OBJECT_ID) FULL_NAME'; -- <<=====
19
20 dbms_redefinition.start_redef_table
21 ( uname => user,
22 orig_table => 'T1',
23 int_table => 'T_INTERIM',
24 col_mapping => l_colmap );
25 end;
26 /
PL/SQL procedure successfully completed.
SQL>
SQL> variable nerrors number
SQL>
SQL> begin
2 dbms_redefinition.copy_table_dependents
3 ( user, 'T1', 'T_INTERIM',
4 copy_indexes => dbms_redefinition.cons_orig_params,
5 num_errors => :nerrors );
6 end;
7 /
PL/SQL procedure successfully completed.
SQL>
SQL> print nerrors
NERRORS
----------
0
SQL>
SQL> begin
2 dbms_redefinition.finish_redef_table
3 ( user, 'T1', 'T_INTERIM' );
4 end;
5 /
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL> select object_id, owner, full_name from t1
2 where rownum < 10;
OBJECT_ID OWNER FULL_NAME
---------- ------------------------------ ------------------------------
30 SYS SYS.I_COBJ#
47 SYS SYS.I_USER2
32 SYS SYS.CCOL$
49 SYS SYS.I_COL2
17 SYS SYS.FILE$
2 SYS SYS.C_OBJ#
29 SYS SYS.C_COBJ#
45 SYS SYS.I_TS1
10 SYS SYS.C_USER#
9 rows selected.