Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Posts
    3

    Talking Unanswered: apply 'diff' between two similar tables

    I'm trying to find a way to do something like

    select * from Table1
    where {a,b,c} not in
    (select a,b,c from Table2).

    Without using concatenation on a,b,c.
    (need it to apply 'diff' between two similar tables).
    ????

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    select * from Table1
    where not exists
    (select 1 from Table2
    where a = Table1.a
    and b = Table1.b
    and c = Table1.c )

    rudy
    http://rudy.ca/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •