Modify a column data type or size in Oracle
Modifying a column data type or size in Oracle is done by using the constructs below
- Changing the column data type:
ALTER TABLE <Table name>
MODIFY ( <Column Name> <New data type>)
- Changing the size of a column:
(Assuming the previous data type of column was varchar2 with the length of 20 and it needs to be changed to 10)
ALTER TABLE <Table name>
MODIFY ( <Column Name> VARCHAR2(10))
Comments