All my comments

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @UserId int = ##UserId##

SELECT 
p.Id as [Post Link], 
pt.Name 'Post Type',
c.Score,
c.CreationDate 'Comment Date',
c.Text
FROM
    Comments c, PostTypes pt, Posts p
WHERE  UserId = @UserId
  AND  p.PostTypeId = pt.Id
  AND  c.PostId = p.Id
ORDER BY 
    Score DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results