clicksor ad

Tuesday, October 10, 2006

Modify datatype of column -coulmn definitions

Modifying Column Definitions

You can use the MODIFY clause to change any of the following parts of a column definition:

* datatype
* size
* default value
* NOT NULL column constraint

The MODIFY clause need only specify the column name and the modified part of the definition, rather than the entire column definition.
Datatypes and Sizes

You can change a CHAR column to VARCHAR2 (or VARCHAR) and a VARCHAR2 (or VARCHAR) to CHAR only if the column contains nulls in all rows or if you do not attempt to change the column size. You can change any column's datatype or decrease any column's size if all rows for the column contain nulls. However, you can always increase the size of a character or raw column or the precision of a numeric column.

You cannot change a column's datatype to a LOB or REF datatype.

No comments: