users

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

SELECT
  *,  
  (CASE WHEN EXISTS(SELECT 1 FROM   posts aa WHERE  aa.AcceptedAnswerId = p.id)
    THEN 1
    ELSE 0 
  END) AS IsAcceptedAnswer
from posts p
where postTypeId = 2
and id = 100000

--select * from posttypes
-- 1 = question
-- 2 = answer

Enter Parameters

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