Home | Previous Page | Next Page   Data Types >

Data Type Casting and Conversion

Occasionally, the data type that was assigned to a column with the CREATE TABLE statement is inappropriate. You might wish to change the data type of a column when you need to store larger values than the current data type can accommodate. The database server allows you to change the data type of the column or to cast its values to a different data type with either of the following methods:

If you change data types, the new data type must be able to store all of the old value.

Both data-type conversion and casting depend on casts registered in the syscasts system catalog table. For information about syscasts, see SYSCASTS (IDS).

A cast is either built-in or user defined. Guidelines exist for casting distinct and extended data types. For more information about casting opaque data types, see IBM Informix: User-Defined Routines and Data Types Developer's Guide. For information about casting other extended data types, see the IBM Informix: Database Design and Implementation Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]