informix
Informix Guide to SQL: Syntax
SQL Statements

DROP ROW TYPE

Use the DROP ROW TYPE statement to remove an existing named-row type from the database.

Syntax

Element Purpose Restrictions Syntax
row_type Name of the named-row type to be dropped The type must have been created with the CREATE ROW TYPE statement. The named-row type must already exist. The named-row type cannot be dropped if it is currently used in any columns, tables or inheritance hierarchies. Data Type, p. 4-53 Identifier, p. 4-205 The named-row type can be of the form owner.type.

Usage

You must be the owner of the row type or have the DBA privilege to use the DROP ROW TYPE statement.

You cannot drop a named-row type if the row type name is in use. You cannot drop a named-row type when any of the following conditions are true:

To drop a named-row type column from a table, use ALTER TABLE.

The DROP ROW TYPE statement does not drop unnamed-row types.

The Restrict Keyword

The RESTRICT keyword is required with the DROP ROW TYPE statement. RESTRICT causes DROP ROW TYPE to fail if dependencies on that named-row type exist.

The DROP ROW TYPE statement fails and returns an error message if:

Example

The following statement drops the row type named employee_t:

Related Information

Related statement: CREATE ROW TYPE

For a description of the system catalog tables, see the Informix Guide to SQL: Reference.

For a discussion of named-row types, see the Informix Guide to SQL: Tutorial.


Informix Guide to SQL: Syntax, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved