Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77

    Unanswered: "two-fielded" primary key. possible?

    Is it possible in MySQL to define "two fields" primary key?

    If yes, then how?

    TIA.
    Yours faithfully,
    Yaroslav Zaremba

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    sure

    create table foo
    ( bar1 integer not null
    , bar2 integer not null
    , primary key (bar1, bar2 )
    );

    rudy

Posting Permissions

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