wanting to create a package in the bank (Oracle) that generates me a new table with some more fields.
I am thinking of passing the table name as a parameter.
ex.
I have the person table with the ID and name
create table Pessoa (
id number(5),
nome varchar2(50))
Now I would like to generate the following command (always include the 4fields below)
create table Pessoa_versao (
id number(5),
nome varchar2(50),
id_versao (5), --PK
data_ativacao date,
data_inativacao date,
versao_no number(5))
I will always get all the fields in the table that was passed by parameter and include these 4 fields.
Tips ???