db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott MacDonald (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-396) Support for ALTER STATEMENT to DROP , MODIFY, RENAME a COLUMN
Date Tue, 08 Nov 2005 19:57:22 GMT
    [ http://issues.apache.org/jira/browse/DERBY-396?page=comments#action_12357062 ] 

Scott MacDonald commented on DERBY-396:
---------------------------------------

I am presently working on the Rename and Drop column issues.

As discussed previously on this Comment page, should the Oracle and Postgres syntax for renaming
and dropping columns be followed?

The syntax is:

ALTER TABLE <table_name> DROP COLUMN <table_name>

ALTER TABLE <table_name> RENAME COLUMN <old_name> TO <new_name>


I have also been browsing documentation for Oracle, Postgres, and DB2 and doing some simple
testing in DB2 regarding contstraints on renaming and dropping columns.

I have found that any column can be dropped, so long as it does not affect the referential
integrity of the table or any other tables in the database (ie. as long as the column is not
a primary or foreign key).

I have also found that any column can be renamed so long as the new column name is not already
the name of another column in the table.  The new column name must also be either an ordinary
or delimited identifier.

If anybody has any comments on these topics before I begin implementation, I would like to
hear them.

Thanks,
Scott

> Support for ALTER STATEMENT to DROP ,  MODIFY, RENAME a COLUMN
> --------------------------------------------------------------
>
>          Key: DERBY-396
>          URL: http://issues.apache.org/jira/browse/DERBY-396
>      Project: Derby
>         Type: New Feature
>   Components: SQL
>  Environment: LINUX 
>     Reporter: Kumar Matcha
>     Assignee: Scott MacDonald
>     Priority: Critical

>
> Alter Statement should support  dropping a column, modifying a column to a different
data type , rename a column.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message