> SELECT * FROM tableone WHERE value NOT IN (SELECT column FROM tabletwo)
> ;
>
> On Wed, 2004-01-21 at 15:26, Randy Johnson wrote:
> >
> > This example is simplified. I hope you understand
> >
> > Each table has one field called ID which is an integer and is the
primary key
> >
> >
> > Table 1
> > List of Programs
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> > 10
> >
> >
> >
> >
> >
> > Table 2
> > Programs members have joined
> > 1
> > 5
> > 8
> >
> >
> >
> > Here is the scenario. I want to compare the values in table one and
Table 2
> >
> > if the value in table one is not in table 2 then display the number to
the screen?
> >
> > Can somebody show me what the sql statement would look like?
> >
> > Thanks
> >
> > Randy
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]