List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:May 28 2004 5:29pm
Subject:Re: Foreign Key Constraints
View as plain text  
> > This makes perfectly sense.
> >
> > So, once again I dare to ask: what's the problem with NULLable
> > Foreign Keys? It works fine :-)
> >
> > (now, who was it that said that FKs should be entered/exist
> > always?)
> >
> > With regards,
>
> Here is the issue...
>
> If you go back to what he was doing this insert doesn't work..
>
> INSERT INTO inno3(PK_Col, Child_Col) VALUES (NULL,1)
>
> He was trying to use a Primary key as his foreign key to inno2, (in this
> example of what he was doing). You can't have a null PK as we all know. IT
> wasn't the foreign key part that was hanging him up..

aha, the PK could be a problem yes. PKs cannot be NULL. That
must be it.

> I think we were on two different tracks and that could have been my fault.

:-)

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com

Thread
Foreign Key Constraintskyuubi27 May
  • Re: Foreign Key ConstraintsJeff Smelser27 May
  • Re: Foreign Key ConstraintsColin Bull27 May
  • Re: Foreign Key ConstraintsRobert J Taylor27 May
  • Re: Foreign Key ConstraintsMartijn Tonies27 May
    • Re: Foreign Key ConstraintsJeff Smelser27 May
  • Re: Foreign Key ConstraintsMartijn Tonies27 May
  • Re: Foreign Key ConstraintsMartijn Tonies28 May
    • Re: Foreign Key ConstraintsJeff Smelser28 May
  • Re: Foreign Key ConstraintsMartijn Tonies28 May
    • Re: Foreign Key ConstraintsMichael Stassen28 May
      • Re: Foreign Key ConstraintsMichael Stassen28 May
  • Re: Foreign Key ConstraintsMartijn Tonies28 May
    • Re: Foreign Key ConstraintsJeff Smelser28 May
    • Re: Foreign Key ConstraintsJeff Smelser28 May
  • Re: Foreign Key ConstraintsMartijn Tonies28 May
Re: Foreign Key ConstraintsSGreen27 May