I'm trying to see if adding the AdjacentDistrict column to the District table will allow restriction of district placement. Currently, no. I'm able to add the column no problem. Issue is trying to add a Foreign Key for it to reference keeps giving me a syntax error. Here is the line:
I get a syntax error near FOREIGN.
Code:
ALTER TABLE Districts
ADD FOREIGN KEY (AdjacentDistrict) REFERENCES Buildings(AdjacentDistrict) ON DELETE SET DEFAULT ON UPDATE SET DEFAULT;
I get a syntax error near FOREIGN.