oracle type使用

CREATE OR REPLACE TYPE birthdate_type AS OBJECT(
year NUMBER(4),
month NUMBER(1)
);
CREATE OR REPLACE TYPE birthdate_tbl_type AS TABLE OF birthdate_type;

create TABLE person(
name varchar2(50),
birthdate birthdate_tbl_type
)
NESTED TABLE birthdate STORE AS birthdate_nest;

insert into person
select ‘Alan‘, CAST(MULTISET
(SELECT 1982,1
FROM dual) AS birthdate_tbl_type)
from dual;

oracle type使用

上一篇:带你看懂MySQL执行计划


下一篇:SQL关于子集中有NULL的问题解析