Skip site navigation (1) Skip section navigation (2)

How do you do a negative join?

From: dj00302003(at)yahoo(dot)com (Jay Davis)
To: pgsql-novice(at)postgresql(dot)org
Subject: How do you do a negative join?
Date: 2004-03-20 21:32:08
Message-ID: 1d17eeb7.0403201332.58f95e91@posting.google.com (view raw or flat)
Thread:
Lists: pgsql-novice
There must be a standard SQL method to query multiple
tables in the following way.  Lets say we have two 
tables, 'allnames' and 'badnames'. We want to get the 
following result:  

"select name from allnames where name-is-not-in-badnames;"  

Clearly I'm an SQL novice but I haven't found any examples
of such a query in my beginning SQL books.  

Thanks.

Responses

pgsql-novice by date

Next:From: Kevin LohkaDate: 2004-03-20 22:33:19
Subject: Creating Functions & Triggers
Previous:From: Stephan SzaboDate: 2004-03-20 14:23:28
Subject: Re: PostgreSQL 7.4.2 new tables [Stupid Query]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group