• thbaig1 (1/23/2013)


    can I DELETE DATA FROM tblQuantityP.ProductId in a way IF parent TABLE has NOT record against it ?

    e.g. Prod1 with ProductId 1 removed from tblProduct, can I DELETE ONly ProductId 1 FROM ALL occurance IN tblQuantityP.ProductId?

    Something like this ?

    delete p from tblQuantityP Where exists (select 2 from tblProduct t where t.ProductId = p.ProductId and p.ProductId = 1)

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)