Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Unanswered: Problem with constraint

    Hi have to disable a constraint that has a name like this:

    CONSTRAINT numb1

    with an space in it. So I can't do:

    Alter table disable ...........

    How do I do it ???

  2. #2
    Join Date
    Nov 2003
    Location
    Bangalore, INDIA
    Posts
    333

    Thumbs up

    HI,

    How U created this CONSTRAINT with a space inbetween its name? Oracle doesn't allow to create constraint names with space inbetween them.
    SATHISH .

  3. #3
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    118

    Quotes

    Enclose the constraint name with quotes:

    <pre>
    [SYSTEM@ODBA.BO.TTS.ING.NL:RS9937]
    SQL> CREATE TABLE DEMO(K NUMBER CONSTRAINT "CN WITH SPACE" PRIMARY KEY);

    Table created.

    [SYSTEM@ODBA.BO.TTS.ING.NL:RS9937]
    SQL> ALTER TABLE DEMO DISABLE CONSTRAINT CN WITH SPACE
    2 /
    ALTER TABLE DEMO DISABLE CONSTRAINT CN WITH SPACE
    *
    ERROR at line 1:
    ORA-00933: SQL command not properly ended


    [SYSTEM@ODBA.BO.TTS.ING.NL:RS9937]
    SQL> ALTER TABLE DEMO DISABLE CONSTRAINT "CN WITH SPACE"
    2 /

    Table altered.
    </pre>

    Good luck!

    Remi
    Remi Visser

    Oracle Database Administrator
    (OCP certified 8i)

    Homepage: http://home.remidian.com/

  4. #4
    Join Date
    Jun 2003
    Posts
    294

    Sucess

    Perfect !!!

    Good job remivisser, It was just what I needed.

    Thanks


    Note: I did't created it, It was created by power designer

Posting Permissions

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