>>David
>>
>>Just throwing in the following, not sure if germane or not:
>>
>>Would using NVL() in the "default value" of the key be of use?
>>
>>Terry
>
>Terry,
>
>If I understand you correctly, your suggestion is that the field in the parent and in the child table would be automatically filled with a chosen value when someone asks to fill it with NULL.
>This could be a cosmetic improvment on the workaround I mentioned. Or did you mean anything else ?
>
>David
David
Yes, kinda meant that. I don't know if your key is numeric or char, but I wondered if, instead of null you got 0 or SPACE(x) in the key. Don't know about someone "... asks to fill it with NULL" but rather the case where RI insists there is a parent before inserting the child (as in your ex. of a boss without a boss FK). Maybe it might mean needing a dummy parent (e.g. Boss record with key of o or SPACE(x) respectively), so that RI insert restrict will be appeased.
I haven't thought it all through - that's your job :-), but just threw in the suggestion. HTH
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.