not in

  • select a.cid,b.name from taba a inner join tabb b on a.cid=b.cid

    where a.cid not in

    (select cid from tabc)

    order by a.cid

    I wanted to get the cid,name of taba and tabb which are not there in tab c

  • Are you getting any errors? It looks good to my. You can also try:

    select a.cid,b.name

    from taba a

    inner join tabb b

    on a.cid=b.cid

    LEFT OUTER JOIN tabc c

    ON a.cid = c.cid

    WHERE c.cid IS NULL

    order by a.cid

  • Thanks.It's working fine

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply