Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Cannot Create Pk/relationship In Mysql #23278
    peterlaursen wrote on Jan 21 2007, 09:34 PM:
    This is sprobably because the tables contain data.  And the FK you define are conflicting with the data!

    example:

    If 'child' (table `orders') has a column CustomerId pointing to the ID column of 'parent' (table `customers`) and if `customers`.`ID` holds the data '1','2','3' and '4' you cannot define a PK if `orders`.`CustomerId` hold other data than  '1','2','3' and '4'.

    A Foreing Key is a CONSTRAINT on data.  there can only be data in 'child' that are in 'parent' too.

    You could try starting with empty tables!

    Hi Pete,

    Thanks for the reply I tried what you have said, I even tried having the fields Null and Not Null “all fields are empty” but still I'm getting this problems.

    Deauxii

Viewing 1 post (of 1 total)