1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| create table titi
(
id_titi number(5) not null
, cd_titi varchar2( 2) null
, lb_titi varchar2(10) not null
, id_type_entite number(5) not null
, constraint pk_titi
primary key (id_titi)
using index
, constraint fk_titi_ref
foreign key (id_type_entite)
references ref_entite (id_type_entite)
);
insert /*+ append */ into titi (id_titi, lb_titi, id_type_entite)
select id_titi, lb_titi, id_type_entite
from titi_old;
commit;
create index fk_titi_ref
on titi (id_type_entite);
select * from titi;
-- drop table titi_old; Après validation |
Partager