Issue Details (XML | Word | Printable)

Key: DERBY-168
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: George Baklarz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Can't ALTER a column to have a new DEFAULT value.

Created: 09/Mar/05 11:36 AM   Updated: 17/Oct/05 10:37 PM
Return to search
Component/s: Documentation
Affects Version/s: 10.0.2.0
Fix Version/s: 10.1.1.0

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby168.diff 2005-05-09 01:08 PM Jeff Levitt 2 kB
Environment: Windows XP SP1 Professional
Issue Links:
Reference
 

Resolution Date: 12/May/05 03:18 AM


 Description  « Hide
Documentation states that an existing column in a table can have a DEFAULT value added via the ALTER TABLE statement. Unfortunately, none of the syntax provided gives a way of accomplishing this. An equivalent command from DB2 would be:

ALTER TABLE EMPL ALTER COLUMN BONUS SET DEFAULT 1000;

Is this an error in the documentation, and omission in the product, or is there a different command to accomplish this?

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Satheesh Bandaram added a comment - 09/Mar/05 01:21 PM
I believe the documentation is wrong here...Derby doesn't have the capability to add a default using ALTER TABLE. We need to fix the documentation.

However, I would suggest filing an Improvement request to add this feature to Derby. I think Derby could use this enhancement and I would be happy to work with any contributor interested in trying to put a patch together.

This feature would expose any contributor to each of the parser, query binder and execution modules but doesn't involve too many changes to each of these. Good improvement to attempt.

Satheesh Bandaram made changes - 09/Mar/05 01:21 PM
Field Original Value New Value
Component/s Documentation [ 11406 ]
Component/s SQL [ 11408 ]
Jeff Levitt added a comment - 09/May/05 01:08 PM
This derby168.diff patch removes the references decribed in the ALTER TABLE description. If the code for doing this is contributed later on, we can always re-insert the descriptions.

Jeff Levitt made changes - 09/May/05 01:08 PM
Attachment derby168.diff [ 19954 ]
Repository Revision Date User Message
ASF #169669 Wed May 11 18:18:28 UTC 2005 jta DERBY-168:
   Removes the references decribed in the ALTER TABLE description.
   If the code for doing this is contributed later on, we can always
   re-insert the descriptions.
Files Changed
MODIFY /incubator/derby/docs/trunk/src/ref/rrefsqlj81859.dita

Jean T. Anderson added a comment - 12/May/05 03:18 AM
Patch committed revision 169669.

Jean T. Anderson made changes - 12/May/05 03:18 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 10.1.0.0 [ 10993 ]
Jeff Levitt added a comment - 07/Jun/05 09:40 AM
Fixed in 10.1.0.0

Jeff Levitt made changes - 07/Jun/05 09:40 AM
Status Resolved [ 5 ] Closed [ 6 ]
Rick Hillegas made changes - 17/Oct/05 10:37 PM
Link This issue is related to DERBY-396 [ DERBY-396 ]