db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A. Rick Anderson" <a_r...@hughes.net>
Subject Re: Can't change column name, or drop database
Date Tue, 15 Apr 2008 20:02:02 GMT
Narayanan wrote:

> A. Rick Anderson wrote:
>
>> I have not been able to change the name of a column in an embedded 
>> database.  When I try, it gives me a false error about the word 
>> "column" appearing in the 8th column.
>> So I tried to drop the table.  Unfortunately, there is a long cascade 
>> of dependencies.  So I  tried to  drop the entire schema and 
>> re-create it from scratch.   Then it tells me that there is an <EOF> 
>> in the fifteen column of line one (which is in the middle of my 
>> schema name).
>
> Here is the drop schema command copy pasted from here
> http://db.apache.org/derby/docs/dev/ref/rrefsqlj31648.html
> DROP SCHEMA schemaName RESTRICT
> The RESTRICT keyword enforces the rule that no objects can be defined 
> in the specified schema for the schema to be deleted from the 
> database. The RESTRICT keyword is required

That failed because the "Schema is not empty"
I entered:
drop schema pmn restrict;

Note: I am using MyEclipse to interact with an embedded instance of Derby.

I finally just ran a script that dropped each table by name, and that 
worked.  Seems like a painful way to rename a column!


Mime
View raw message