Create and Drop type in Oracle DB

create or replace TYPE “ora_typ_01” AS OBJECT
( delievery_order_number VARCHAR2(20),
haulage_number VARCHAR2(20),
count_issued NUMBER,
count_total NUMBER,
document_status VARCHAR2(10)
)
Type ora_typ_01 compiled

CREATE OR REPLACE EDITIONABLE TYPE ora_typ_01 AS OBJECT
( delievery_order_number VARCHAR2(20),
haulage_number VARCHAR2(20),
count_issued NUMBER,
count_total NUMBER,
document_status VARCHAR2(10)
)
Type ORA_TYP_01 compiled

select * from dba_objects where object_type=’TYPE’ and owner=’LEOSUNNY’;
LEOSUNNY ora_typ_01 106101 TYPE 17-10-04 17-10-04
LEOSUNNY ORA_TYP_01 106102 TYPE 17-10-04 17-10-04

drop type “LEOSUNNY”.”ora_typ_01″ ;
drop type “LEOSUNNY”.”ORA_TYP_01″

create or replace TYPE “ORA_TYP_01” AS OBJECT
( delievery_order_number VARCHAR2(20),
haulage_number VARCHAR2(20),
count_issued NUMBER,
count_total NUMBER,
document_status VARCHAR2(10)
)

CREATE OR REPLACE EDITIONABLE TYPE ORA_TYP_01 AS OBJECT
( delievery_order_number VARCHAR2(20),
haulage_number VARCHAR2(20),
count_issued NUMBER,
count_total NUMBER,
document_status VARCHAR2(10)
)

select * from dba_objects where object_type=’TYPE’ and owner=’LEOSUNNY’;
LEOSUNNY ORA_TYP_01 106102 TYPE 17-10-04 17-10-04 2017-10-04:14:55:12

drop type “LEOSUNNY”.”ORA_TYP_01″ ;

Leave a Reply

Your email address will not be published. Required fields are marked *