SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    (problem solved)...never mind

    Does anyone know how to write the following SQL query to be compatible with mySQL?

    SELECT table1.* FROM table1 WHERE NOT table1.primaryid IN (SELECT table2.primaryid FROM table2)

    Thanks!
    Last edited by msyKYLE; Jan 8, 2003 at 12:43.

  2. #2
    SitePoint Member
    Join Date
    Dec 2002
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found my answer....

    SELECT table1.* FROM table1 LEFT JOIN table2 ON table1.id=table2.id WHERE table2.id IS NULL;


Bookmarks

Posting Permissions

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