If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Dropping a default column value

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-09, 11:05
andrewhallam andrewhallam is offline
Registered User
 
Join Date: Dec 2003
Location: Nottingham, England
Posts: 52
Dropping a default column value

IBM Informix Dynamic Server Version 11.10.UC1

Could someone please confirm to me that the only way to drop a default column value in Informix is to basically alter the column to itself minus the default - for example.

Add the default:
ALTER TABLE mytab MODIFY mycol varchar(10) default 'x'
Remove the default:
ALTER TABLE mytab MODIFY mycol varchar(10)

i.e there is no equivalent command to DB2's
ALTER TABLE mytab ALTER COLUMN mycol DROP DEFAULT

thanks for any replies to this.

Andy
Reply With Quote
  #2 (permalink)  
Old 10-10-09, 20:16
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
If I wouldn't have access to the dbaccess utility I would try that yes. In dbaccess you can change it with the subsequent options "Table", "Alter", "Constraints", "Defaults" and "Drop".

Regards,
Hans
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On