我有這個表(Prefrences_Table)檢查和SQL Server表進行比列的值
--------------------------
|student | Preferences |
--------------------------
Stud A | Stud B
Stud A | Stud C
Stud B | Stud E
Stud B | Stud A
Stud C | Stud F
Stud F | Stud B
--------------------------
如果「梭哈A」在他的首選項列表中添加「梭哈B」,我想,以檢查是否「釘B「在他的偏好中也添加了」stud A「,所以我可以將它們加入到一個組中。 這怎麼可以使用SQL或C#完成?