{"id":1360,"date":"2012-12-14T10:00:03","date_gmt":"2012-12-14T15:00:03","guid":{"rendered":"http:\/\/sqlity.net\/en\/?p=1360"},"modified":"2014-11-13T13:52:52","modified_gmt":"2014-11-13T18:52:52","slug":"a-join-a-day-the-left-anti-semi-join","status":"publish","type":"post","link":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/","title":{"rendered":"A Join A Day \u2013 The Left Anti Semi Join"},"content":{"rendered":"<div>\n<h3>Introduction<\/h3>\n<p>\nThis is the fourteenth post in my <a href=\"http:\/\/sqlity.net\/en\/1146\/a-join-a-day-introduction\/\">A Join A Day<\/a> series about SQL Server Joins. Make sure to let me know how I am doing or ask your burning join related questions by leaving a comment below.\n<\/p>\n<p>\nToday we are going to talk about the Left Anti Semi Join. And with that it is time for another short Latin lesson: \"Anti\"\n<\/p>\n<p>\nThe prefix \"anti\" means as much as \"opposite of\". While most dictionaries list it as originating from the Latin language, is roots are actually deeper in ancient greek: <a href=\"http:\/\/en.wiktionary.org\/wiki\/%E1%BC%80%CE%BD%CF%84%CE%AF#Ancient_Greek\" title=\"\u1f00\u03bd\u03c4\u03af\">\u1f00\u03bd\u03c4\u03af<\/a>.\n<\/p>\n<p>\n So, the Left Anti Semi Join is the opposite of a <a href=\"http:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/\">Left Semi Join<\/a>. However, that does not make it a <a href=\"http:\/\/sqlity.net\/en\/1354\/a-join-a-day-the-right-semi-join\/\">right semi join<\/a>. Instead \"Anti\" affects which rows are returned and which aren't. Like the Left Semi Join, the Left Anti Semi Join returns only rows from the left row source. Each row is also returned at most once. And duplicates are also not eliminated. However, other than the Left Semi Join, the Left Anti Semi Join returns only rows for which no match on the right side exists. Let's look at an example.\n<\/p>\n<h3>LEFT ANTI SEMI JOIN Example<\/h3>\n<p>\nThe easiest way to write a query with a logical left anti semi join is a <span class=\"tt\">NOT EXISTS()<\/span> query like this:\n<\/p>\n<div>\n[sql]\nSELECT  *<br \/>\nFROM    Person.BusinessEntity be<br \/>\nWHERE   NOT EXISTS ( SELECT 1<br \/>\n                     FROM   Person.BusinessEntityAddress bea<br \/>\n                     WHERE  bea.BusinessEntityID = be.BusinessEntityID );<br \/>\n[\/sql]\n<\/div>\n<p>\nThis query returns the 1198 entities that do not have an address at all:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg\" alt=\"Left Anti Semi Join Example\" title=\"Left Anti Semi Join Example\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1363\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nSo exactly all the entities that did not get returned by the Left Semi Join are the ones that the Left Anti Semi Join is returning.\n<\/p>\n<p>\nLet's look at the <span class=\"tt\">TblA \u2013 TblB<\/span> example again with this query:\n<\/p>\n<div>\n[sql]\nSELECT  *<br \/>\nFROM    dbo.TblA AS a<br \/>\nWHERE   NOT EXISTS ( SELECT 1<br \/>\n                     FROM   dbo.TblB AS b<br \/>\n                     WHERE  a.TblA_Val = b.TblB_Val );<br \/>\n[\/sql]\n<\/div>\n<p>\nAs always, this is the data in the two tables:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup.jpg\" alt=\"setup for all-cases join example\" title=\"setup for all-cases join example\" width=\"1093\" height=\"656\" class=\"aligncenter size-full wp-image-1234\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup-300x180.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup-1024x614.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-join-example-setup-150x90.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nThe query returns just a single row:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example.jpg\" alt=\"Example for All-Cases from Left Anti Semi Join\" title=\"Example for All-Cases from Left Anti Semi Join\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1362\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-all-cases-example-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nThe row <span class=\"tt\">TblA_Val = 1<\/span> is the only row that does not have a match in <span class=\"tt\">TblB<\/span>. Therefore it is the only one returned by this query.\n<\/p>\n<h3>LEFT ANTI SEMI JOIN Syntax<\/h3>\n<p>\nThere is again no statement or command that can be directly linked to a Left Anti Semi Join. There are many ways to write a query like this. However, the <span class=\"tt\">NOT EXISTS()<\/span> syntax used in both examples above is the most common way to write a Left Anti Semi Join query.\n<\/p>\n<h3>LEFT ANTI SEMI JOIN Operator<\/h3>\n<p>\nLike with the Left Semi Join, there is no command or statement that will always lead to a Left Anti Semi Join operator. The optimizer will consider the Left Anti Semi Join operator for any query that fits the model. However there is no guarantee that the operator will be used.\n<\/p>\n<p>\nFor above BusinessEntity-without-Address query the optimizer selected a Left Anti Semi Join operator:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan.jpg\" alt=\"Execution Plan for Left Anti Semi Join\" title=\"Execution Plan for Left Anti Semi Join\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1364\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-execution-plan-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nHowever, let's look at this logically equivalent query:\n<\/p>\n<div>\n[sql]\nSELECT  be.*<br \/>\nFROM    Person.BusinessEntity be<br \/>\nLEFT OUTER JOIN Person.BusinessEntityAddress bea<br \/>\n        ON bea.BusinessEntityID = be.BusinessEntityID<br \/>\nWHERE   bea.BusinessEntityID IS NULL;<br \/>\n[\/sql]\n<\/div>\n<p>\nIt first finds executes a left outer join between the <span class=\"tt\">BusinessEntity<\/span> table and the <span class=\"tt\">BusinessEntityAddress<\/span> table. Of the 20812 rows that come out of the left outer join, most get filtered out by the where clause. Only the 1198 rows that do not have a match get returned.\n<\/p>\n<p>\nEven though this query is logically equivalent it ends up with a different execution plan:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan.jpg\" alt=\"Not a Left Anti Semi Join Execution Plan\" title=\"Not a Left Anti Semi Join Execution Plan\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1361\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/not-a-left-anti-semi-join-execution-plan-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nThe execution plan reflects exactly the way the query is written. First a Left Outer Join operator joins the two tables together and then an additional Filter operator removes the rows for which a match exists. Because of the additional operator and because of the 20812 rows that get passed into it, only to get discarded en mass (only 1198 rows survive) this execution plan is actually less efficient than the Left Anti Semi Join execution plan.\n<\/p>\n<p>\nThe SQL Server optimizer cannot do an exhaustive search of all possible plans when compiling a query. Therefore sometimes a sub-optimal plan gets selected. However, the team developing the optimizer is constantly working on improving this already amazing piece of software and it is possible that with the next version or even the next service pack both queries will result in the same plan.\n<\/p>\n<h3>Summary<\/h3>\n<p>\nThe Left Anti Semi Join filters out all rows from the left row source that have a match coming from the right row source. Only the orphans from the left side are returned. While there is a Left Anti Semi Join operator, there is no direct SQL command to request this operator. However, the <span class=\"tt\">NOT EXISTS()<\/span> syntax shown in the above examples will often result in this operator being used.\n<\/p>\n<h3>A Join A Day<\/h3>\n<p>\nThis post is part of my December 2012 \"A Join A Day\" blog post series. You can find the table of contents with all posts published so far in the introductory post: <a href=\"http:\/\/sqlity.net\/en\/1146\/a-join-a-day-introduction\/\">A Join A Day \u2013 Introduction<\/a>. Check back there frequently throughout the month.\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.<\/p>\n<p> <a href=\"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/\">[more&#8230;]<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[28,29,5,27],"tags":[],"class_list":["post-1360","post","type-post","status-publish","format-standard","hentry","category-a-join-a-day","category-fundamentals","category-general","category-series"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Join A Day \u2013 The Left Anti Semi Join - sqlity.net<\/title>\n<meta name=\"description\" content=\"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Join A Day \u2013 The Left Anti Semi Join - sqlity.net\" \/>\n<meta property=\"og:description\" content=\"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/\" \/>\n<meta property=\"og:site_name\" content=\"sqlity.net\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sqlity.net\" \/>\n<meta property=\"article:published_time\" content=\"2012-12-14T15:00:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-13T18:52:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg\" \/>\n<meta name=\"author\" content=\"Sebastian Meine\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sqlity\" \/>\n<meta name=\"twitter:site\" content=\"@sqlity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sebastian Meine\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/\"},\"author\":{\"name\":\"Sebastian Meine\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"headline\":\"A Join A Day \u2013 The Left Anti Semi Join\",\"datePublished\":\"2012-12-14T15:00:03+00:00\",\"dateModified\":\"2014-11-13T18:52:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/\"},\"wordCount\":849,\"commentCount\":6,\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-anti-semi-join-example.jpg\",\"articleSection\":[\"A Join A Day\",\"Fundamentals\",\"General\",\"Series\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/\",\"url\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/\",\"name\":\"A Join A Day \u2013 The Left Anti Semi Join - sqlity.net\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-anti-semi-join-example.jpg\",\"datePublished\":\"2012-12-14T15:00:03+00:00\",\"dateModified\":\"2014-11-13T18:52:52+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"description\":\"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#primaryimage\",\"url\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-anti-semi-join-example.jpg\",\"contentUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-anti-semi-join-example.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1360\\\/a-join-a-day-the-left-anti-semi-join\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/sqlity.net\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Join A Day \u2013 The Left Anti Semi Join\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/sqlity.net\\\/en\\\/\",\"name\":\"sqlity.net\",\"description\":\"Quality for SQL\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/sqlity.net\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\",\"name\":\"Sebastian Meine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g\",\"caption\":\"Sebastian Meine\"},\"sameAs\":[\"http:\\\/\\\/sqlity.net\",\"https:\\\/\\\/x.com\\\/sqlity\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Join A Day \u2013 The Left Anti Semi Join - sqlity.net","description":"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/","og_locale":"en_US","og_type":"article","og_title":"A Join A Day \u2013 The Left Anti Semi Join - sqlity.net","og_description":"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.","og_url":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/","og_site_name":"sqlity.net","article_publisher":"https:\/\/www.facebook.com\/sqlity.net","article_published_time":"2012-12-14T15:00:03+00:00","article_modified_time":"2014-11-13T18:52:52+00:00","og_image":[{"url":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg","type":"","width":"","height":""}],"author":"Sebastian Meine","twitter_card":"summary_large_image","twitter_creator":"@sqlity","twitter_site":"@sqlity","twitter_misc":{"Written by":"Sebastian Meine","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#article","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/"},"author":{"name":"Sebastian Meine","@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"headline":"A Join A Day \u2013 The Left Anti Semi Join","datePublished":"2012-12-14T15:00:03+00:00","dateModified":"2014-11-13T18:52:52+00:00","mainEntityOfPage":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/"},"wordCount":849,"commentCount":6,"image":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#primaryimage"},"thumbnailUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg","articleSection":["A Join A Day","Fundamentals","General","Series"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/","url":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/","name":"A Join A Day \u2013 The Left Anti Semi Join - sqlity.net","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#primaryimage"},"image":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#primaryimage"},"thumbnailUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg","datePublished":"2012-12-14T15:00:03+00:00","dateModified":"2014-11-13T18:52:52+00:00","author":{"@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"description":"The Left Anti Semi Join is the polar opposite of the Left Semi Join. While it also only returns data from the left table, it returns only those rows that are not returned by the Left Semi Join. Read on to find out how to use it.","breadcrumb":{"@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#primaryimage","url":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg","contentUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-anti-semi-join-example.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/sqlity.net\/en\/1360\/a-join-a-day-the-left-anti-semi-join\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sqlity.net\/en\/"},{"@type":"ListItem","position":2,"name":"A Join A Day \u2013 The Left Anti Semi Join"}]},{"@type":"WebSite","@id":"https:\/\/sqlity.net\/en\/#website","url":"https:\/\/sqlity.net\/en\/","name":"sqlity.net","description":"Quality for SQL","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sqlity.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c","name":"Sebastian Meine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4ab0a6d02dd494849a584a2c3c8bc3bdcef1d0aa5f87e98bf905dbdb9ad2ce3a?s=96&d=mm&r=g","caption":"Sebastian Meine"},"sameAs":["http:\/\/sqlity.net","https:\/\/x.com\/sqlity"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2wXuw-lW","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/1360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/comments?post=1360"}],"version-history":[{"count":0,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/1360\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/media?parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/categories?post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/tags?post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}