List:General Discussion« Previous MessageNext Message »
From:Lola J. Lee Beno Date:February 7 2006 3:27pm
Subject:Re: Can't Create Foreign Key Constraints
View as plain text  
Peter Brawley wrote:
> Lola,
> 
> />And got this following error message:
> 
>  >ERROR 1072 (42000): Key column '(not null)' doesn't exist in table
> /
> Yes, it's telling you what;s wrong: to define a constraint on a key, the 
> table def must first define the key.

Looking over the script again, RatingID is being defined, first in 
FilmsRatings which I ran to create this table and then in Films, the 
create table script which didn't work.


How do I make the table def first define the key explicitly?  Or am I 
missing something obvious?


-- 
Lola - mailto:lola@stripped
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Freedom is not free.
I'm in Bowie, MD, USA, halfway between DC and Annapolis.
Thread
Can't Create Foreign Key ConstraintsLola J. Lee Beno7 Feb
  • Re: Can't Create Foreign Key ConstraintsMichael Stassen7 Feb
    • Re: Can't Create Foreign Key ConstraintsLola J. Lee Beno7 Feb
      • Re: Can't Create Foreign Key ConstraintsGleb Paharenko7 Feb
        • Re: Can't Create Foreign Key ConstraintsLola J. Lee Beno7 Feb
          • Re: Can't Create Foreign Key ConstraintsGleb Paharenko7 Feb
  • Re: Can't Create Foreign Key ConstraintsPeter Brawley7 Feb
    • Re: Can't Create Foreign Key ConstraintsLola J. Lee Beno7 Feb