Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


ALTER TYPE


Alter a user-defined type.



where alter-action is:



where method is:



and where specific-method is:



Usage

Embedded/Interactive/ODBC/JDBC

Description

The ALTER TYPE statement is used to add method specifications and attributes to a type, or to drop method specifications and attributes from a type.

It is only the creator of a type that can alter it.

Examples

 CREATE TYPE person AS (firstname NCHAR VARYING(30),
                        lastname NCHAR VARYING(30),
                        birth DATE,
                        sex VARCHAR(7) DEFAULT 'Unknown');
 
 ALTER TYPE person ADD ATTRIBUTE address VARCHAR(30);
 
 ALTER TYPE person DROP ATTRIBUTE sex;

Restrictions

The restrictions for CREATE TYPE applies to ALTER TYPE also. (See CREATE TYPE.)

Add and drop attribute can only be specified for structured types.

It is not possible to add or drop attributes to a type that is used in a table definition.

It is not possible to drop an attribute if the observer or mutator method for the attribute is used in a routine, trigger, or view definition.

Standard Compliance

Standard
Compliance
Comments
SQL-2011
Features outside core
Feature S023 'Basic structured types'.
Feature S024, "Enhanced structured types".


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX