Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Unanswered: sql version of "is not among"?

    What would be the correct sql syntax for a query along these lines:

    select * from table1 where table1.id IS NOT AMONG table2.particularcolumn


    sorry, i really got stuck.

  2. #2
    Join Date
    Nov 2003
    Posts
    91
    select * FROM table1 LEFT JOIN table2 USING (particularcolumn)
    WHERE table1.particularcolumn IS NULL;

  3. #3
    Join Date
    Nov 2003
    Posts
    91
    my bad. should read,

    select * FROM table1 LEFT JOIN table2 USING (particularcolumn)
    WHERE table2.particularcolumn IS NULL;

  4. #4
    Join Date
    Feb 2004
    Posts
    6
    great!!! many thanks

Posting Permissions

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