Possible duplicate:How to make varchar2 field shorter in Oracle?
In Oracle (9i and above)
Alter table employee MODIFY ename varchar2(10);
I want to change the table employee column name from varchar2 (30) to varchar2 (10)
Case1: if there is data in the table that has an ename column whose length is less than 10 char (I mean that it can comfortably fit in varchar2 (10)) - is this allowed by the oracle?
Case 2: if there is data in the table containing an ename column that is longer than 10 char (I mean that it cannot fit in varchar2 (10)) - is this not allowed by the oracle?
Case 1: Yes, it works great.
Case 2: Error with error ORA-01441: cannot reduce the column length because some value is too large.
Share and enjoy.