Change the Size of a Column in Oracle SQL Plus
Tags: Oracle, Oracle Tutorial, Oracle Article, SQL, Database, Data base, how to change the size of column, how to change the size of column in SQL, Change the Size of a Column in Oracle SQL Plus, ALTER TABLE, MODIFY Column, Change Column Size, Column Size, Change Column Width
This article demonstrates how to change the size of a column in Oracle SQL Plus
Change the Size of a Column in Oracle SQL
Some times, we required to change the size of the column in a table in an Oracle
Database. Change in size means minimize or maximize the width of the particular
column. We need to use ALTER TABLE Command to do so.
ALTER TABLE table_name MODIFY column_name datatype(size);
The following example illustrate how to modify or change the size of a
column in Oracle SQL Plus :
Now, Inserting some values in the column item
Here, things are different when changing the size
of a column containing some records. Consider the image below:
So, we can increase the size of a column even it holds some data but we'll get
error while decreasing the size if there is a record having greater size than
size specified in the ALTER Command to be set.