List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:October 17 2002 3:25am
Subject:Re: comparing tables
View as plain text  

> i have a problem to compare data inside two tables. i have two tables let
> say: "Master" and "Pick". For example the content of these two tables are:
> Table "Master"         Table "Pick"
> a                            a
> b                            b
> c                            c
> d                            d
> e
> f
> g
> my goal is to know any data that missing in table "pick" comparing to
> "master". The answer should be "e, f, and g". Would you help me to show me
> the query?
> thank you so much ..

Assuming field m in master and p in pick...
    SELECT m from master
    LEFT JOIN pick on master.m=pick p
    WHERE pick.p IS NULL


comparing tablesToni17 Oct
  • Re: comparing tablesPeter Brawley17 Oct