Right now i am using the below query
string myQry = "DELETE FROM myMainTbl AS a WHERE a.id NOT IN(SELECT b.mainid FROM mySubTbl_1 AS b WHERE b.maini