Subject Re: [IBO] Shorten string varchar column
Author Daniel Rail

At October 30, 2003, 21:55, Gulut wrote:

> i have a table called Customer,
> one if its field is CusID varchar(8)

> now i want to make it varchar(5) this way:

> alter table Customer
> alter CusID type varchar(5)

> i got this error:
> unsuccessful metadata update
> New size specified for column CUSID must be at least 5 characters

First, this is a question to be posted on firebird-support group on
Yahoo Groups, since it's not related to IBO.

And, here are the steps to achieve what you want to do:
1. Create a varchar(5) TEMP field
2. Copy the values from CUSID to the new TEMP field
3. Drop CUSID
4. Rename the TEMP field to CUSID

And, if you have dependents(foreign keys, views, SPs, triggers and
indices), you have to eliminate those dependencies first. Otherwise,
you wouldn't be able to drop CUSID.

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (