The signature of an instance or constructor method is the partial definition that you must provide when you create a UDT (see CREATE TYPE (Distinct Form) and CREATE TYPE (Structured Form)) or add an instance or constructor method to the UDT definition (see ALTER TYPE).
- The association between the specified method and the UDT being created with a CREATE TYPE statement.
- Its specific name, parameter style, SQL data access, and whether it is deterministic or not (see Method Definitions Are Split Between CREATE METHOD And CREATE TYPE Definitions). These specifications are all mandatory.
The method signature also defines, possibly redundantly, the data type it returns. Note that the RETURNS clause is mandatory for the method signature, but optional within the clauses included within CREATE METHOD. The definitions must be identical if both are specified.
- Its method name.
- Its parameter list.
- The CONSTRUCTOR keyword if it is so defined in the method body of its associated CREATE METHOD statement.
You do not need to specify the INSTANCE keyword if its associated CREATE METHOD statement explicitly defines it as such because if no keyword is specified for a method, it is always assumed to be an instance method by default.
You must always create the method body using the CREATE METHOD statement.