Looking at the code from this answer which uses a composite key to control which child tables can contain the parent key, I noticed he specifies the primary key of the foreign table first, then the smaller lookup value second.
Does the order in the foreign key matter? When creating an index on this foreign composite key, would it be more efficient to specify the lookup value first (since there would only be a few possible values) then the primary key? Or is specifying the primary key first still faster because it's the clustered index on the foreign table?
Also, does it matter per DB? I'm using SQL Server.