title: How to write a sql query to get only whose ID is 100000004 from the below 3 tables
body: <p>my requirement is to display FriendUserID, FriendUserName, PicID, Image from the below tables and whose ID is 100000004</p>
  
  <p>Note: I need to display my friend data not mine My UserID is : 100000004</p>
  
  <p><a href="https://i.stack.imgur.com/b1D7S.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b1D7S.jpg" alt="Friend List Table"></a></p>
  
  <p><a href="https://i.stack.imgur.com/bY6Tz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bY6Tz.jpg" alt="User Table"></a></p>
  
  <p><a href="https://i.stack.imgur.com/QbQGi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QbQGi.png" alt="Picture Table "></a></p>
  
  <p>Edit: Code from comments:</p>
  
  <pre><code>SELECT
      Name = (u.firstname + u.lastname),
      fl.frienduserid,
      pp.picid,
      pp.image
  FROM profilepic pp
  INNER JOIN users u
      ON pp.userid = u.userid
  INNER JOIN friendlist fl
      ON fl.frienduserid = u.userid
  WHERE fl.userid = @uid
  OR fl.frienduserid = '100000004'
  </code></pre>