Good Day Friends,
I want to know that how to make two columns are unique in SQL server in the special manner as I explained below.
The Way I want :
-------------------------
User | Friend |
-------------------------
Stevan | Johns }
William | David }This is how I want two columns to be unique.
The Way I don't Want :
-------------------------
User | Friend |
-------------------------
Steven | Johns }
Johns | Steven }This must not allow.
Steven is a friend of Johns So They are friends so I don't want Johns to add a new row saying Johns is a friend of Steven.
Steven add new row like this :
-------------------------
User | Friend |
-------------------------
Steven | Johns }
I Don't want john to add a row again Like this
-------------------------
User | Friend |
-------------------------
Steven | Johns }
Johns | Steven }
I hop my question is clear, IF someone know a good answer for this , please help me. Thanks in advance for any answer