Get repeated rows in based on child table from Parent table

SELECT * 
FROM `parents` 
WHERE id
IN (

SELECT parent_id
FROM `tbl_parent_child` 
GROUP BY parent_id
HAVING COUNT( parent_id ) =2
)

Comments

Popular posts from this blog

AIOMgr: Preparing flush failed with VERR_NOT_SUPPORTED, disabling async flushes

Create Virtual Host in IIS Server

The model type is invalid. please select an item from the list ( ASP.Net MVC)