KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two tables built like this (this is just a simplified and non-proprietary example): Person Table ----------- p_Id, f_name, l_name Job Table ---------- job_Id, job_desc I want to add a foreign key column, Persons.job_Id, that can be nullable that references Job.job_Id (the PK) The reason is, the job may not be known in advance, so it could be null. Having an "Other" is not an option. I had this so far but I'm getting "could not create constraint". ALTER TABLE dbo.Person ADD job_Id INT FOREIGN KEY (job_Id) REFERENCES dbo.Job(job_Id)
Tags (comma-separated)
Save Edits
Cancel