Oracle
ALTER table statement (2)
Figo Kim
2006. 12. 1. 16:55
Modifying a Column
ALTER TABLE dept80 MODIFY (last_name VARCHAR2(30)); |
- The width or precision of a numeric column
- The width of numeric or character columns
- Decrease the width of a column if:
- contains only null value
- The table has no rows
- the decrease in column width is not less than the existing values in that column.
- Data type (if contains null values)
exception : Char to VARCHAR2 (when it has null values)
- Default Values
Dropping a Column
ALTER TABLE dept80 DROP COLUMN job_id; |
- The partitioning key of a partitioned table or column can't be dropped.