I\'ve got two tables and I\'ve added a foreign key constraint. Kewl - works great. Now, is it possible to further constrain that relationship against some data in the parent
You can create a CHECK CONSTRAINT on the column.
ALTER TABLE Mammals ADD CONSTRAINT CHK_AnimalType CHECK (dbo.fnGetAnimalType(animalId) = 1 );
Now you need a function fnGetAnimalType that will return the animalType of the given animalId.
Here is more info from MSDN.