• By the way, do you know how to add multiple conditions to a IF NOT EXISTS query. I need to check two conditions instead of one. I first wrote:

    IF NOT EXISTS (SELECT * FROM FRIENDS WHERE Person=@profileid AND Friend=@sid) OR (SELECT * FROM FRIENDS WHERE Person=@sid AND Friend=@profileid)

    INSERT INTO Friends (Person, Friend) VALUES (@profileid, @sid)

    INSERT INTO Friends (Person, Friend) VALUES (@sid, @profileid)

    I then realize you can't use OR in this context. Should a comma be used between them or write two "IF NOT EXISTS" statements?

    Any help would be appreciated.