Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Location
    Nottingham, England
    Posts
    52

    Unanswered: 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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •