CREATE TABLE [dbo].[Friends] (
[FriendshipId] INT IDENTITY (1, 1) NOT NULL,
[MyId] INT NULL,
[FriendId] INT NULL,
[Status] INT NULL,
[MeOnline] INT NULL,
[FriendOnline] INT NULL,
[PingStatus] INT NULL
);
--this view friends
CREATE VIEW [dbo].[frdsView]
AS
select MyId,Id,F_Name+' '+L_Name as Name,Pic,Counttry,case when Status=1 then'Friends' else 'Request send'end as friend from
RegisterTable full outer join FriendsTable on FriendId=Id
where MyId=MyId
--how can i find mutual friends