﻿
{"id":7760,"date":"2018-04-24T21:05:50","date_gmt":"2018-04-24T21:05:50","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=7760"},"modified":"2018-04-24T21:05:50","modified_gmt":"2018-04-24T21:05:50","slug":"t-sqlde-except-operatoru-ile-iki-tablo-arasindaki-verisel-farki-bulmak","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/t-sqlde-except-operatoru-ile-iki-tablo-arasindaki-verisel-farki-bulmak\/","title":{"rendered":"T-SQL&#8217;de Except Operat\u00f6r\u00fc \u0130le \u0130ki Tablo Aras\u0131ndaki Verisel Fark\u0131 Bulmak"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>\u00d6nceki yaz\u0131lar\u0131mdan <a href=\"http:\/\/www.gencayyildiz.com\/blog\/t-sqlde-not-in-fonksiyonu-ile-tablolar-arasindaki-verisel-farki-bulma\/\" rel=\"noopener\" target=\"_blank\">T-SQL\u2019de Not In Fonksiyonu \u0130le Tablolar Aras\u0131ndaki Verisel Fark\u0131 Bulma<\/a> ba\u015fl\u0131kl\u0131 makalemde Not In fonksiyonu ile iki tablo aras\u0131ndaki fark\u0131 bulmu\u015f ve tablo olarak elde etmi\u015ftik. \u015eimdi ise benzer mant\u0131kta Except operat\u00f6r\u00fcn\u00fc kullanarak ayn\u0131 i\u015flemi ger\u00e7ekle\u015ftirmeye \u00e7al\u0131\u015facak ve Not In fonksiyonu ile i\u015flevsel fark\u0131n\u0131 ele alaca\u011f\u0131z.<\/p>\n<p>\u0130lk olarak Not In fonksiyonunu ele al\u0131rsak e\u011fer;<\/p>\n<p>Not In fonksiyonu, iki tablo aras\u0131ndaki fark\u0131 belirtilen kolonlar \u00fczerinden alg\u0131lamakta ve sonucu d\u00f6nd\u00fcrmektedir.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Not-In-Fonksiyonu-\u0130le-Tablolar-Aras\u0131ndaki-Verisel-Fark\u0131-Bulma-1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Not-In-Fonksiyonu-\u0130le-Tablolar-Aras\u0131ndaki-Verisel-Fark\u0131-Bulma-1.png\" alt=\"T-SQL&#039;de Not In Fonksiyonu \u0130le Tablolar Aras\u0131ndaki Verisel Fark\u0131 Bulma\" width=\"448\" height=\"181\" class=\"aligncenter size-full wp-image-7757\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Not-In-Fonksiyonu-\u0130le-Tablolar-Aras\u0131ndaki-Verisel-Fark\u0131-Bulma-1.png 448w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Not-In-Fonksiyonu-\u0130le-Tablolar-Aras\u0131ndaki-Verisel-Fark\u0131-Bulma-1-300x121.png 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/a><br \/>\n\u00d6rnekte de g\u00f6rd\u00fc\u011f\u00fcn\u00fcz \u00fczere iki tablo aras\u0131ndaki &#8220;PersonelId&#8221; kolonu baz al\u0131narak fark hesaplanmakta ve sonu\u00e7 elde edilmektedir. Burada her iki tabloda da di\u011fer kolonlar\u0131n i\u00e7erikleri \u00f6nem arz etmemekte, sade ve sadece belirtilen kolonlar \u00fczerinden fark hesab\u0131 yap\u0131lmaktad\u0131r. Bu hesab\u0131n mant\u0131\u011f\u0131 ise, belirtilen kolona ait birinci tabloda olup ikinci tabloda olmayan t\u00fcm sat\u0131rlar\u0131 getirmektir.<\/p>\n<p>Except operat\u00f6r\u00fc ise; iki tablo aras\u0131ndaki t\u00fcm verileri dikkate almakta ve herhangi bir kolonda de\u011fi\u015fiklik s\u00f6z konusuysa alg\u0131lamakta ve bizlere sonu\u00e7 tablosunda sunmaktad\u0131r.<\/p>\n<p>Bu yap\u0131ya en g\u00fczel \u00f6rne\u011fi; biri sorgu sonucu elde edilen, bir di\u011feri ise fiziksel olarak var olan birebir ayn\u0131 tablolar \u00fczerinde verebiliriz.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Except-Operat\u00f6r\u00fc-\u0130le-\u0130ki-Tablo-Aras\u0131ndaki-Verisel-Fark\u0131-Bulmak.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Except-Operat\u00f6r\u00fc-\u0130le-\u0130ki-Tablo-Aras\u0131ndaki-Verisel-Fark\u0131-Bulmak.png\" alt=\"T-SQL&#039;de Except Operat\u00f6r\u00fc \u0130le \u0130ki Tablo Aras\u0131ndaki Verisel Fark\u0131 Bulmak\" width=\"531\" height=\"245\" class=\"aligncenter size-full wp-image-7765\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Except-Operat\u00f6r\u00fc-\u0130le-\u0130ki-Tablo-Aras\u0131ndaki-Verisel-Fark\u0131-Bulmak.png 531w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Except-Operat\u00f6r\u00fc-\u0130le-\u0130ki-Tablo-Aras\u0131ndaki-Verisel-Fark\u0131-Bulmak-300x138.png 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2018\/04\/T-SQLde-Except-Operat\u00f6r\u00fc-\u0130le-\u0130ki-Tablo-Aras\u0131ndaki-Verisel-Fark\u0131-Bulmak-980x450.png 980w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/a><br \/>\nDikkat ederseniz e\u011fer Except operat\u00f6r\u00fcnden \u00f6nce verilen sorgu fiziksel tablomuzken, sonra verilen ise farkl\u0131 bir kompleks sorgu neticesinde birebir olu\u015fturulan tablodur. Haliyle Except operat\u00f6r\u00fc ilk tablodaki verilere nazaran herhangi bir kolonda farkl\u0131 olan t\u00fcm sat\u0131rlar\u0131 sonu\u00e7 tablosuna eklemekte ve bizlere ayr\u0131 bir tablo olarak d\u00f6nd\u00fcrmektedir.<\/p>\n<p>Son olarak, Not In fonksiyonu belirli bir kolon bazl\u0131 fark\u0131 yakalarken, Except operat\u00f6r\u00fc ise sat\u0131r\u0131n b\u00fct\u00fcn\u00fcn\u00fc yani t\u00fcm kolonlar\u0131 hesaba katarak fark\u0131 yakalamaktad\u0131r diyelim ve her iki komut aras\u0131ndaki mant\u0131ksal ve i\u015flevsel fark\u0131 tekrar mahiyetinde peki\u015ftirdikten sonra makalemizi sonland\u0131ral\u0131m.<\/p>\n<p>Sonraki yaz\u0131lar\u0131m\u0131zda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, \u00d6nceki yaz\u0131lar\u0131mdan T-SQL\u2019de Not In Fonksiyonu \u0130le Tablolar Aras\u0131ndaki Verisel Fark\u0131 Bulma ba\u015fl\u0131kl\u0131 makalemde Not In fonksiyonu ile iki tablo aras\u0131ndaki fark\u0131 bulmu\u015f ve tablo olarak elde etmi\u015ftik. \u015eimdi ise benzer mant\u0131kta Except&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":3415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1082,1412],"tags":[2294,2289,2295,2290,2291,2292,2293],"class_list":["post-7760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-server","category-sql-server-2016","tag-except-not-in-farki","tag-except-operatoru","tag-except-vs-not-in","tag-sql-except","tag-sql-except-operatoru","tag-t-sql-except","tag-t-sql-except-operatoru"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/7760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=7760"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/7760\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/3415"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=7760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=7760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=7760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}