Adding Java-SQL Columns

If Java is enabled in the database, you can add Java-SQL columns to a table.

The declared class (datatype) of the new Java-SQL column must implement either the Serializable or Externalizable interface.

When you add a Java-SQL column to a table, the Java-SQL column cannot be specified:
  • As a foreign key

  • In a references clause

  • As having the UNIQUE property

  • As the primary key

If you specify:
  • in row – the value stored cannot exceed 16KB, depending on the page size of the data server.

  • If off row – the column cannot be:
    • Referenced in a check constraint

    • Referenced in a select that specifies distinct

    • Specified in a comparison operator, in a predicate, or in a group by clause

See Java in Adaptive Server Enterprise.