Oracle

ALTER table statement (2)

Figo Kim 2006. 12. 1. 16:55
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

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.

'Oracle' 카테고리의 다른 글

The SET UNUSED Option  (0) 2006.12.01
ALTER table statement (2)  (0) 2006.12.01
The ALTER TABLE Statement  (0) 2006.12.01
The ALTER TABLE Statement  (0) 2006.12.01
Object Privileges  (0) 2006.12.01