Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

DROP CAST

Use the DROP CAST statement to remove an existing cast from the database.

Only Dynamic Server supports this statement, which is an extension to the ANSI/ISO standard for SQL.

Syntax

Read syntax diagramSkip visual syntax diagram>>-DROP CAST--(--source_type--AS--target_type--)---------------><
 
Element Description Restrictions Syntax
source_type Data type that the cast accepts as input Must exist Identifier; Data Type
target_type Data type returned by the cast Must exist Identifier; Data Type

Usage

You must be owner of the cast or have the DBA privilege to use DROP CAST. Dropping a cast removes its definition from the syscasts system catalog table, so the cast cannot be invoked explicitly or implicitly. Dropping a cast has no effect on the user-defined function associated with the cast. Use the DROP FUNCTION statement to remove the user-defined function from the database.

Warning:
Do not drop built-in casts, which user informix owns. These are required for automatic conversions between built-in data types.

A cast defined on a given data type can also be used on any DISTINCT types created from that source type. If you drop the cast, you can no longer invoke it for the DISTINCT types, but dropping a cast that is defined for a DISTINCT type has no effect on casts for its source type. When you create a DISTINCT type, the database server automatically defines an explicit cast from the DISTINCT type to its source type and another explicit cast from the source type to the DISTINCT type. When you drop the DISTINCT type, the database server automatically drops these two casts.

Related Information

Related statements: CREATE CAST and DROP FUNCTION .

For more information about data types, refer to the IBM Informix Guide to SQL: Reference.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]