语法:

CREATE TYPE {schema.}name AS TABLE (name1 type1 {, name2 type2,...})

实列1:

CREATE TYPE   tt_publishers AS TABLE (

publisher  INTEGER,

name  VARCHAR(50),

price DECIMAL,

cnt  INTEGER

);

实列2:

CREATE type  tt_year AS TABLE(

year varchar(4),

price decimal,

cnt integer

);

删除类型:

语法:DROP TYPE {schema.}name {CASCADE}

posted on 2013-04-09 16:24  沧海-重庆  阅读(889)  评论(0编辑  收藏  举报