Solved

Foreign Key and Not Null

Posted on 2007-04-03
2
179 Views
Last Modified: 2010-03-20
Hi

Just a basic question.  You can't have a foreign key on an item that is not null.  Is this correct?

Greg
0
Comment
Question by:greg_c
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 18842173
?
no, that is not correct.

you can have a foreign key pointing from and pointing to a field that is not null.
however, you will need to have the referred value in the "master/lookup" table be present BEFORE you use that value in the child table.
0
 

Author Comment

by:greg_c
ID: 18842235
Thank you
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question