CREATE PROCEDURE [dbo].[spInsertUserFriend]
	@userid varchar(50),
	@friendid varchar(50),
	@approved bit
AS
BEGIN
   IF NOT EXISTS(
      SELECT * FROM [dbo].[tblUserFriends] WHERE userid = @userid and friendid = @friendid
   )
   INSERT INTO [dbo].[tblUserFriends]
           ([userid]
           ,[friendid]
		   ,[approved])
		   VALUES
            (
			@userid,
			@friendid,
			@approved
		   );
END