You can not directly decrease the size of the VARCHAR2
column if it has some data.
You need to
- create new column with decreased size.
- Fill the data in new column
- remove the old column
- rename the new column
queries should be as follows:
alter table member add member_name_new varchar2(20);
update member set member_name_new = member_name;
alter table member drop column member_name;
alter table member rename column member_name_new to member_name;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…