DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: Disabling primary key

  1. #1
    Join Date
    Jan 2002
    Posts
    17
    hi
    how to disable more tha one primary key in a table.

    Regards
    Madhavi
    Selvan

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    what do you mean more than one PK??? is that even possible?

  3. #3
    Join Date
    Apr 2002
    Location
    Philippines
    Posts
    77
    Hi Sollin,

    What do you mean by "more than one primary key"?

    But you could try this:

    ALTER TABLE DISABLE PRIMARY KEY
    /

    HTH.
    skid

  4. #4
    Join Date
    Apr 2002
    Location
    Philippines
    Posts
    77
    ALTER TABLE DISABLE PRIMARY KEY
    /

    .. forgot the

  5. #5
    Join Date
    Oct 2001
    Location
    Madrid, Spain
    Posts
    763
    Be care to specify the index tablespace when enable the pk, if not the associated index will be created in the user's default tablespace.

    Cheers

    Angel

  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you can always change the default attributes of the index so it wont be created in your default tablespace

  7. #7
    Join Date
    Jan 2002
    Posts
    17

    Possibility of having more Primary Keys..

    Hai Pando...

    Yes .it's Possible to have more than one Primary key in a Table. The code is as follows...

    create table sss(sno number(6),sname varchar2(20),sal number(6),primary key(sno,sname,sal);

    Regards

    Madhavi
    Selvan

  8. #8
    Join Date
    Mar 2002
    Posts
    301
    Hi,

    "Hai Pando...

    Yes .it's Possible to have more than one Primary key in a Table. The code is as follows...

    create table sss(sno number(6),sname varchar2(20),sal number(6),primary key(sno,sname,sal);

    Regards

    Madhavi
    Selvan"

    For your information, even after creating like this it is still One primary key.
    We call this as composite Primary Key.

    I will highly appreciate if you can go through the Oracle Concepts Manuals.

    Vijay.
    Say No To Plastics

  9. #9
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    Re: Possibility of having more Primary Keys..

    Originally posted by sollin
    Hai Pando...

    Yes .it's Possible to have more than one Primary key in a Table. The code is as follows...

    create table sss(sno number(6),sname varchar2(20),sal number(6),primary key(sno,sname,sal);

    Regards

    Madhavi
    Selvan
    I understand what you mean but the matter of the fact is that the table SSS has only one PK. It is called Composite Primary Key.

    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  10. #10
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    oh well.... if that is called more than one PK

Posting Permissions

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


Click Here to Expand Forum to Full Width