From: Peter Brawley Date: April 21 2007 7:11pm Subject: Re: What is the equivalent of the minus function? List-Archive: http://lists.mysql.com/mysql/206292 Message-Id: <462A61C9.5020909@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------030409020800020901050204" --------------030409020800020901050204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >select email from participants >minus >select email from excluded Try an exclusion join (http://www.artfulsoftware.com, "The [Not] exists query pattern") ... select email from participants p left join excluded e on p.email=e.email where e.email is null; PB ----- Brian Menke wrote: > I am trying to do something like this > > > > select email from participants > > minus > > select email from excluded > > > > It seems there is no minus function in MySQL. I tried goofing around with > intersects and union, but can't seem to make it work. > > > > Is there a better way to achieve the same thing? > > > > Thanks in advance for your help! > > > > -Brian Menke > > > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.463 / Virus Database: 269.5.7/771 - Release Date: 4/21/2007 11:56 AM > --------------030409020800020901050204--