<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Oracle: Is OUTER JOIN Better Than NOT EXISTS?</title>
	<atom:link href="http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: IN un EXISTS salÄ«dzinÄÅ¡anas operatori &#171; DatubÄzu resurss latviski</title>
		<link>http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/#comment-326327</link>
		<dc:creator>IN un EXISTS salÄ«dzinÄÅ¡anas operatori &#171; DatubÄzu resurss latviski</dc:creator>
		<pubDate>Thu, 08 Jan 2009 07:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/765/oracle-is-outer-join-better-than-not-exists#comment-326327</guid>
		<description>[...] Oracle: Is OUTER JOIN Better Than NOT EXISTS? [...]</description>
		<content:encoded><![CDATA[<p>[...] Oracle: Is OUTER JOIN Better Than NOT EXISTS? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack McGarry</title>
		<link>http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/#comment-309021</link>
		<dc:creator>Jack McGarry</dc:creator>
		<pubDate>Thu, 04 Dec 2008 14:28:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/765/oracle-is-outer-join-better-than-not-exists#comment-309021</guid>
		<description>You can do this and get the same result...

delete 
from  t1 a
where 0  = (select count(b.id) 
            from   t2 b 
            where b.id = a.id);</description>
		<content:encoded><![CDATA[<p>You can do this and get the same result&#8230;</p>
<p>delete<br />
from  t1 a<br />
where 0  = (select count(b.id)<br />
            from   t2 b<br />
            where b.id = a.id);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ash</title>
		<link>http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/#comment-295984</link>
		<dc:creator>Ash</dc:creator>
		<pubDate>Fri, 31 Oct 2008 18:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/765/oracle-is-outer-join-better-than-not-exists#comment-295984</guid>
		<description>just stumbled upon this, so maybe useless by now...

Anyway, the delete should be similar to select of the missing records:

select a.id from t1 a left join t2 b on a.id=b.id where b.id is null;

just apply the delete syntax of your DBMS:

delete from t1 a left join t2 b on a.id=b.id where b.id is null;

or in MSAccess:

delete a.* from t1 as a left join t2 as b on a.id=b.id where b.id is null;

hope it helps.</description>
		<content:encoded><![CDATA[<p>just stumbled upon this, so maybe useless by now&#8230;</p>
<p>Anyway, the delete should be similar to select of the missing records:</p>
<p>select a.id from t1 a left join t2 b on a.id=b.id where b.id is null;</p>
<p>just apply the delete syntax of your DBMS:</p>
<p>delete from t1 a left join t2 b on a.id=b.id where b.id is null;</p>
<p>or in MSAccess:</p>
<p>delete a.* from t1 as a left join t2 as b on a.id=b.id where b.id is null;</p>
<p>hope it helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Preetha</title>
		<link>http://www.pythian.com/news/765/oracle-is-outer-join-better-than-not-exists/#comment-200197</link>
		<dc:creator>Preetha</dc:creator>
		<pubDate>Fri, 16 May 2008 11:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/blogs/765/oracle-is-outer-join-better-than-not-exists#comment-200197</guid>
		<description>delete from t1 a
   where exists
    (select 1 from t1 one left outer join t2 two on two.id = one.id where two.id is null);</description>
		<content:encoded><![CDATA[<p>delete from t1 a<br />
   where exists<br />
    (select 1 from t1 one left outer join t2 two on two.id = one.id where two.id is null);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

