SIGN UP MEMBER LOGIN:
   
ARTICLE
Reader Level:

Change the Size of a Column in Oracle SQL Plus

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.

Syntax :
ALTER TABLE table_name MODIFY column_name datatype(size);

Example :
The following example illustrate how to modify or change the size of a column in Oracle SQL Plus :

change_column_size1.gif
change_column_size2.gif

Now, Inserting some values in the column item

change_column_size3.gif

Here, things are different when changing the size of a column containing some records. Consider the image below:

change_column_size4.gif

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.

Login to add your contents and source code to this article
This Feature is Sponsored By
post comment
COMMENT USING