少年阿宾

那些青春的岁月

  语源科技BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks
自定义类型:
create or replace type mytype as object(
id int,
name varchar(20)
)

建表使用刚刚定义的mytype:
create table MYTYPETABLE
(
  ID     NUMBER,
  PERSON MYTYPE
)


相表里面插入数据:
insert into mytypetable values (1,mytype(2,'abin'))


查找数据:
select t.id,t.person.id,t.person.name from mytypetable t

posted on 2012-09-09 22:37 abin 阅读(410) 评论(0)  编辑  收藏 所属分类: oracle