Oracle Custom Field Type target: define a method for writing data types Use a custom TYPE to CREATE a table for a field Add a data method for querying data other define a TYPE of SQL code CREATE OR REPLACE TYPE PropertyValue AS OBJECT (number_value number, string_value varchar2 (2000), date_value date, member function getNumberValue RETURN number, member function getStringValue RETURN varchar2, member function getDateValue RETURN date ); compile a TYPE method SQL code CREATE OR REPLACE TYPE BODY PropertyValue AS MEMBER FUNCTI ON getNumberValue RETURN number as begin return number_value; END getNumberValue; member function getStringValue RETURN varchar2 as begin return string_value; END getStringValue; member function ready RETURN date as begin return date_value; END ready; END; SQL code create table IGRP_SYS_PROPERTIES (nid number primary key, propertyKey varchar2 (2000), propertyValue Property Value, propertyType varchar2 (2000), description varchar2 (2000), createUserId number, modifyUserId number, createDate date, modifyDate date ); create sequence SQ_IGRP_PROPERTYID start with 1 increment by 1 MAXVALUE 1E27 MINVALUE 1 nocycle cache 20 NOORDER; -- Add comments to the columns comment on column IGRP_SYS_PROPERTIES.nid is 'pk unique value '; comment on column IGRP_SYS_PROPERTIES.propertyKey is 'Property key '; Comment on column IGRP_SYS_PROPERTIES.propertyValue is 'attribute name'; comment on column comment is 'attribute type'; comment on column IGRP_SYS_PROPERTIES.description is 'description'; comment on column comment is 'create user id '; comment on column IGRP_SYS_PROPERTIES.modifyUserId is 'modify user id'; comment on column IGRP_SYS_PROPERTIES.createDate is 'creation date'; comment on column IGRP_SYS_PR OPERTIES. modifyDate is 'modify date'; add data SQL code insert into IGRP_SYS_PROPERTIES VALUES (SQ_IGRP_PROPERTYID.nextval, 'xxx', PropertyValue (10, null, null), 'number', 'xxx ', 101,101, sysdate, sysdate); commit; query data SQL code select isp. propertyValue. getNumberValue () as myValues from IGRP_SYS_PROPERTIES isp where isp. propertyKey = 'xxx' and isp. propertyType = 'number'; other 1. when the data type is used in a data table, its BODY cannot be changed. Therefore, you must DROP the table related to the type before you can modify its BODY. 2. There is a problem with EXPORT and IMPORT. 3. SQL * Plus COPY commands cannot be used in custom data types.