code_junkie

Writing Comments table in database

Nov 12th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. SELECT * FROM Comment c
  2. JOIN CommentedItem ci on c.CommentedItemId = ci.CommentedItemId
  3. JOIN Friend f on f.CommentedItemId = ci.CommentedItemId
  4. WHERE f.FriendId = @FriendId
Add Comment
Please, Sign In to add comment