Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136

    Unanswered: To rename a constraint

    Hello All!

    How can i rename the following constraint:

    ALTER TABLE SERVER MODIFY
    HOST NOT NULL;


    E.g. from "SYS_1234" to "NN_SERVER" ?
    Regards,
    Julia

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    ALTER TABLE server RENAME CONSTRAINT sys_1234 TO nn_server;

    I think it won't work in Oracle versions lower than 9.

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136
    Thank You, Littlefoot,
    you are right:
    unfortunately it doesn't work in my Oracle8.1.
    Regards,
    Julia

  4. #4
    Join Date
    Jan 2004
    Posts
    370
    alter table server drop constraint sys_1234;
    alter table server modify(host constraint nn_server not null);

  5. #5
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    136
    Thank You,
    it works!
    Regards,
    Julia

Posting Permissions

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