How to design table to allow marking records as related to each other?
A bridge table
related_id  Related_TO_ID
     13           2
     13          12

If 1--&gt;2  is equal to 2--&gt;1 you need one row else you need two.
Now You can get all ids that are related to 13
And if you want to exclude some ration ships you can add a column that indicates that 13 is never related to 42
SELECT Related_TO_ID FROM brdgetable WHERE related_id   = 13

Why you never should save data in delimitedcolumns you can read here