Query results from left table

  • I have 2 tables

    table1

    id, type, date, name

    table2

    id, type, id1

    I want to select all rows from table 1 which are not in table 2, based on id and type.

  • SELECT t1.*

    FROM table1 t1

    LEFT JOIN table2 t2

    ON t1.id = t2.id AND t1.type = t2.type

    WHERE t2.id IS NULL AND t2.type IS NULL

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

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

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