Derby doesn't allow using java classes as column types. Yes, some of the system tables do have these java classes, but that is based on old, non-standard implementation. Derby doesn't have any API for users to create those.

Satheesh

Arda M wrote:
Hello,
 
Some system tables have column types of java classes. Can we use java classes as column types? Are these types documented somewhere? Do we just say ResultSet.getObject() and cast it to the type and use it? I tried to create a table similar to sys.systriggers but it gives error:
 
CREATE TABLE APP.SYSTRIGGERS2(
  TRIGGERID CHAR(36) NOT NULL,
  TRIGGERNAME VARCHAR(128) NOT NULL,
  SCHEMAID CHAR(36) NOT NULL,
  CREATIONTIMESTAMP TIMESTAMP NOT NULL,
  EVENT CHAR(1) NOT NULL,
  FIRINGTIME CHAR(1) NOT NULL,
  TYPE CHAR(1) NOT NULL,
  STATE CHAR(1) NOT NULL,
  TABLEID CHAR(36) NOT NULL,
  WHENSTMTID CHAR(36),
  ACTIONSTMTID CHAR(36),
  REFERENCEDCOLUMNS org.apache.derby.catalog.ReferencedColumns,
  TRIGGERDEFINITION LONG VARCHAR,
  REFERENCINGOLD BOOLEAN,
  REFERENCINGNEW BOOLEAN,
  OLDREFERENCINGNAME VARCHAR(128),
  NEWREFERENCINGNAME VARCHAR(128)
)


Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.