db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ondruska <peter.ondru...@gmail.com>
Subject Re: how to remove a column
Date Fri, 07 Sep 2007 14:11:56 GMT
Create another table without the column you want to drop and insert  
data from old table.

On 7.9.2007, at 18:07, Brandon Dohman wrote:

> Is it possible to remove a column any other way?  Without using the  
> drop command?
>
> Tim Dudgeon wrote:
>> 10.3 is the first released version to support DROP COLUMN.
>> Prior to 10.3 this was not possible.
>>
>> Tim
>>
>> Brandon Dohman wrote:
>>> Rick
>>>
>>> Yes I am using the older version, not sure which version, but I  
>>> haven't updated it since January of this year.  Due to time  
>>> constraints i would prefer not to update at this time.  Unless it  
>>> can't be avoided to drop a column that I need dropped.
>>>
>>> Thanks for your help
>>>
>>> Rick Hillegas wrote:
>>>> Hi Brandon,
>>>>
>>>> This syntax works in the latest Derby release (10.3.1.4). Are  
>>>> you using an older version of Derby?
>>>>
>>>> Thanks,
>>>> -Rick
>>>>
>>>> Brandon Dohman wrote:
>>>>> I was wondering what the sql syntax is to drop a column from a  
>>>>> derby database.
>>>>>
>>>>> i tried this and it gave me the error below: ALTER TABLE  
>>>>> contacts DROP COLUMN userid
>>>>>
>>>>> Error code -1, SQL state 42X01: Syntax error: Encountered  
>>>>> "DROP" at line 1, column 22.
>>>>> Line 1, column 1
>>>>>
>>>>> Thanks for your help
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> -- 
>
> Brandon Dohman
> Chief Technical Officer
> Mobile Medical Systems
> 2612 DeWitt Av
> Mattoon, IL 61938
> 815.383.6909
>
> www.mobilemedicalsystems.com
> www.pen.eiu.edu/~brdohman
>


Mime
View raw message