db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Moots <a...@builderlynx.com>
Subject Re: ALTER TABLE __ ALTER COLUMN Data type syntax
Date Wed, 10 Jan 2007 17:29:26 GMT
Thank you for your help.  The work around discussed at that JIRA issue 
link sort of works for me.
The statement:
ALTER TABLE t DROP COLUMN c1
fails with the error message:
Syntax error: Encountered "DROP" at line 1, column 32.

I guess that means Derby doesn't support dropping columns yet. 

I'll live with the extra column of old data.

Thanks

Alex.

Bryan Pendleton wrote:

> Alex Moots wrote:
>
>> Thanks for the quick response, but the query:
>> ALTER TABLE bl.USERSPROPERTIES ALTER COLUMN Value SET DATA TYPE 
>> CHAR(32000)
>> Still gives me the same error message:
>> The length, precision, or scale attribute for column, or type mapping 
>> 'CHAR(32000)' is not valid
>
>
> I think in this case the problem is that you can't change a VARCHAR
> to a CHAR using ALTER TABLE .. ALTER COLUMN. You can only change
> a VARCHAR to another (longer) VARCHAR.
>
> In the next release, you'll be able to use the techniques described
> in DERBY-1515 (http://issues.apache.org/jira/browse/DERBY-1515) to
> make more substantial changes to a column's datatype in a dynamic 
> fashion.
>
> thanks,
>
> bryan
>
>
>
>

-- 
Alex Moots                           www.BuilderLynx.com
Builder Lynx                         t: 416-425-2925  f: 416-425-4233


Mime
View raw message