Results 1 to 2 of 2

Thread: Select

  1. #1
    Join Date
    Nov 2005

    Unanswered: Select

    How do we compare 2 tables country1(name1,..,...) and country2(name2,...,...) so that we want find a value that is in name1 not in whole name2 ???
    When i try to do this by select it returns me all the values that are not equal to name1 from name2 and it doesn't just search for example if 'Greece' is in name2 or not but just if 'Greece' is equal with x1,x2,x3,x4,..,... from name2 .

    I am a bit stuck here...

  2. #2
    Join Date
    Apr 2005
    Baltimore, MD
    like this?
    SELECT * 
    FROM table1 
    WHERE field1 NOT IN (SELECT DISTINCT field2 FROM table2)

Posting Permissions

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