<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwizguide.com/rss_namespace/">
 <channel>
  <title>Datakent Forum : SQL Server UNION, UNION ALL, EXCEPT, INTERSECT</title>
  <link>http://forum.datakent.com/</link>
  <description>XML içerik linki; Datakent Forum : Microsoft SQL Server : SQL Server UNION, UNION ALL, EXCEPT, INTERSECT</description>
  <pubDate>Thu, 30 Apr 2026 23:49:41 +0000</pubDate>
  <lastBuildDate>Fri, 10 Dec 2010 20:04:09 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.54</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.datakent.com/RSS_post_feed.asp?TID=2025</WebWizForums:feedURL>
  <image>
   <title>Datakent Forum</title>
   <url>http://forum.datakent.com/forum_images/datakent.com_forums.png</url>
   <link>http://forum.datakent.com/</link>
  </image>
  <item>
   <title>SQL Server UNION, UNION ALL, EXCEPT, INTERSECT : UNION, UNION ALL, EXCEPT, INTERSECT       ***...</title>
   <link>http://forum.datakent.com/forum_posts.asp?TID=2025&amp;PID=4452#4452</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="http://forum.datakent.com/member_profile.asp?PF=1" rel="nofollow">murat turan</a><br /><strong>Konu:</strong> 2025<br /><strong>Gönderim Zamanı:</strong> 10.Aralik.2010 Saat 20:04<br /><br />UNION, UNION ALL, EXCEPT, INTERSECT<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>*** EXCEPT, INTERSECT&nbsp;&nbsp;&nbsp; komutları SQL Server 2008 de kullanılabilir ! Diğer deyimler önceki sürümlerde kullanılabiliyordu.</DIV><DIV>&nbsp;</DIV><DIV>-- sql server 2008 ile gelen yeni deyimler except ve intersect<BR>-- geçici tabloları yapalım ve test kayıtları ekleyelim<BR>CREATE TABLE #UnionTest1<BR>(<BR>idcol int IDENTITY,<BR>col2 char(3),<BR>);<BR>CREATE TABLE #UnionTest2<BR>(<BR>idcol int IDENTITY,<BR>col4 char(3),<BR>);<BR>INSERT INTO #UnionTest1<BR>VALUES<BR>('AAA'),<BR>('BBB'),<BR>('CCC');<BR>INSERT INTO #UnionTest2<BR>VALUES<BR>('CCC'),<BR>('DDD'),<BR>('EEE');</DIV><DIV>-- örnekler --</DIV><DIV>-- her iki ablodaki benzersiz tüm kayıtları listeliyor. bir nevi distinct<BR>select col2 from #UnionTest1<BR>UNION<BR>select col4 from #Uniontest2</DIV><DIV>--her iki tablodaki tüm kayıtları koşulsuz listeler<BR>select col2 from #UnionTest1<BR>union all<BR>select col4 from #UnionTest2</DIV><DIV><BR>--ilk tablodaki benzersiz kayıtları listeler. ve ikinci tablodan herhangi bir veri almaz<BR>--ikinci tablo sadece kontrol için kullanılmış olur<BR>select col2 from #uniontest1<BR>except<BR>select col4 from #uniontest2</DIV><DIV>--alternatif select<BR>select col2 from #uniontest1 as t1<BR>where not exists(select col4 from #uniontest2 where col4 = t1.col2)</DIV><DIV><BR>--her iki tabloda ortak/benzer kayıtları listeler<BR>select col2 from #uniontest1<BR>intersect<BR>select col4 from #uniontest2</DIV><DIV>--alernatif select<BR>select col2 from #uniontest1 as t1<BR>where exists(select col4 from #uniontest2 where col4 = t1.col2)</DIV>]]>
   </description>
   <pubDate>Fri, 10 Dec 2010 20:04:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.datakent.com/forum_posts.asp?TID=2025&amp;PID=4452#4452</guid>
  </item> 
 </channel>
</rss>