![]() |
|
Use the DROP CAST statement to remove a previously defined cast from the database.
You must be the owner of the cast or have the DBA privilege to use the DROP CAST statement.
When you drop a cast, the cast definition is removed from the database. Once you drop a cast, it cannot be invoked either 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 the built-in casts, which are owned by user informix. The database server uses built-in casts for automatic conversions between built-in data types.
A cast that is defined on a particular data type can also be used on any distinct types created from that type. When you drop the cast, you can no longer invoke it for the distinct types. 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 statements: CREATE CAST and DROP FUNCTION
For more information about data types, refer to the Informix Guide to SQL: Reference.