Get the Record where only Two Records exists in SQL
If I understand you correctly, what you want is
SELECT ParentID
FROM   UserTbl 
GROUP BY ParentID 
HAVING SUM(CASE WHEN userID IN (1, 2) THEN 1 ELSE 0 END) = 2
AND    COUNT(*) = 2

The first condition SUM(CASE WHEN userID IN (1, 2) THEN 1 ELSE 0 END) = 2 is to check User 1 and 2 are in
The second condition COUNT(*) = 2 users count = 2 (only user 1 and 2)