How to change the column size in Oracle SQL?

Asked By 0 points N/A Posted on -
qa-featured

After creating a table in SQL, I wish to change the size allotted to a particular column (say, I want to change the size of the salary column from 3 to 4).

But I could find no option in the SQL developer version, is there any command to modify this?

SHARE
Answered By 80 points N/A #120750

How to change the column size in Oracle SQL?

qa-featured

There are instances that we need to change or alter the size of the column in Oracle SQL. That means we either minimize or maximize the width of that column. To do that, we have to use the ALTER TABLE command wherein the syntax is going to be:

ALTER TABLE table_name MODIFY column_name datatype(size);

To understand the syntax above better, I would suggest that you check the examples provided on.

http://www.dbtalks.com/pagenotfound.aspx and the other syntax sample on. 

http://www.java2s.com/Code/Oracle/Table/AltertableChangesthesizeofacolumn.htm.

Also, on http://www.sqlinfo.net/oracle/oracle_Alter_Add_column.php, you will see the syntax on how to add a column on an already existing table, or have it altered or changed.

Related Questions