Show all comments and post id's for a question

0

Please login or register to vote for this query.

(click on this box to dismiss)

http://meta.stackoverflow.com/questions/319386/question-appearing-twice-in-google-search-results/319389#319389

Stack Overflow

Q&A for professional and enthusiast programmers

select 'Q', id as id 
from posts 
where id = ##question:int##
and posttypeid = 1 -- Q
union
select 'A', id as id
from posts 
where parentid = ##question:int##
and posttypeid = 2 -- A
union
select 'CQ', id
from comments
where postid = ##question:int##
union
select 'CA', c.id
from comments c
inner join posts p on c.postid = p.id
where p.parentid = ##question:int##

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results