Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Referential Integrity question
All,
I have two file in a one to many relationship. I am trying to restrict insertion of records into a child table unless a parent record exists, but I have found that the act of inserting a record in the child causes the trigger to fail unless I have a dummy record in the parent with a blank key.
Two question:
1 Is there a way to insert a record in the child with the parent key already replaced?
2. Is putting a dummy record in the parent the only way around this problem?
TIA
Rex
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement