Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    Dhaka,Bangladesh
    Posts
    86

    Unanswered: Multiple Primary Key in one table like MS access

    Hello Experts

    I can apply multiple primary key in table build in access. but when i issued it
    in oracle as

    create table abc
    (A number(10) primary key,
    B number(10) primary key,
    C number(10)
    )
    /

    It show's error as :
    ERROR at line 3:
    ORA-02260: table can have only one primary key

    Is it not possible to mensure composit primary key (multiple primary key) in Oracle?? Plz give me any example if it is possible..
    hello

  2. #2
    Join Date
    Nov 2003
    Location
    India
    Posts
    114

    Composite Primary Key

    You can create a composite primary key in Oracle but the syntax is bit different.

    create table abc
    (
    A number(10),
    B number(10),
    C number(10),
    constraint pk1 primary key(A,B)
    );

  3. #3
    Join Date
    Nov 2003
    Location
    Dhaka,Bangladesh
    Posts
    86

    Thanks

    Thanks varun_751980 For Ur Help.
    hello

Posting Permissions

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