[thelist] SQL Joins

Howard Cheng howcheng at ix.netcom.com
Tue May 21 15:42:06 CDT 2002


You've pretty much got it already:

SELECT table1.one_name
FROM table1, table2
WHERE table1.two_id = table2.two_id
AND table2.two_name != 'George'

At 04:35 PM 5/16/2002 -0400, Bill Haenel wrote:
>I have 2 tables: table1 and table2
>
>table1 has three fields: one_id, one_name, two_id
>
>table2 has two fields: two_id, two_name
>
>I want to select table1.one_name where table1.two_id matches any of the
>table2.two_id's where table2.two_name != 'George'.

::::::::::::::::::::::
Howard Cheng
howcheng at ix.netcom.com
AIM: bennyphoebe
ICQ: 47319315




More information about the thelist mailing list