DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002

    Question compound primary key

    My oracle table has compound primary key of three columns.
    The table was created with CREATE TABLE ..... PRIMARY KEY( field1, field2, field3).... . What will be different if I create table with CREATE TABLE ..........PRIMARY KEY (field2,field3,field1).

  2. #2
    Join Date
    Jun 2000
    Madrid, Spain
    if your queries say

    select *
    from xxx
    where field1 = x

    then index will be used

    if you change your compound key then index wont be used

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

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.