Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    14

    Unanswered: In a 'composite primary key' can one or more (but not all) be null

    Hi All,

    In a 'composite primary key' can one or more (but not all) be null.

    For example
    PRIMARY KEY (key1,key2);

    In this example some cases can key1 or key2 is be null (but not both) and still satisfy the non-null and unique constraint for primary key ?

    -Thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the answer is no
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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