{"id":1348,"date":"2012-12-12T10:00:27","date_gmt":"2012-12-12T15:00:27","guid":{"rendered":"http:\/\/sqlity.net\/en\/?p=1348"},"modified":"2014-11-13T13:53:09","modified_gmt":"2014-11-13T18:53:09","slug":"a-join-a-day-the-left-semi-join","status":"publish","type":"post","link":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/","title":{"rendered":"A Join A Day \u2013 The Left Semi Join"},"content":{"rendered":"<div>\n<h3>Introduction<\/h3>\n<p>\nThis is the twelfth 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's topic is the \"left semi join\". \"Semi\" is a Latin prefix that means \"half\". So, a semi join is a half join. Half in this context means, that the result contains only rows of one of the two row sources: The left semi join returns only data from the left row source. However, the \"left\" prefix does not mean that the left semi join is related to the left outer join. \"Left Outer\" and \"Left Semi\" are totally independent concepts. Let's look at an example.\n<\/p>\n<h3>LEFT SEMI JOIN Example<\/h3>\n<p>\nThe most common use case in which SQL Server's optimizer might decide to use a Left Semi Join operator is an <span class=\"tt\">EXISTS()<\/span> query like this:\n<\/p>\n<div>\n[sql]\nSELECT  *<br \/>\nFROM    Person.BusinessEntity be<br \/>\nWHERE   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 takes each row from the BusinessEntity table and checks if there is at least one address in the BusinessEntityAddress table. Only entities that have at least on address are included in the result. An entity that has two addresses is still only returned once. In fact, depending on the algorithm SQL Server chooses for the left semi join, it might even stop looking for additional matches to a left side row as soon as it has found the first one.\n<\/p>\n<p>\nThe query above query returns this result:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg\" alt=\"Left Semi Join Example\" title=\"Left Semi Join Example\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1352\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nOf the 20777 business entities in the table 19579 have at least one address and are therefore included in the result. Even though 35 of them have two addresses, all entities are included only once.\n<\/p>\n<p>\nLet's take a look at the same <span class=\"tt\">TblA \u2013 TblB<\/span> example that we have seen in earlier articles like <a href=\"http:\/\/sqlity.net\/en\/1227\/a-join-a-day-the-left-outer-join\/\">The Left Outer Join<\/a>. Remember, the tables look like this:\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>\nNow let's run this <span class=\"tt\">EXISTS()<\/span>-query against those tables:\n<\/p>\n<div>\n[sql]\nSELECT * FROM dbo.TblA AS a<br \/>\nWHERE EXISTS(SELECT 1 FROM dbo.TblB AS b WHERE a.TblA_Val = b.TblB_Val)<br \/>\n[\/sql]\n<\/div>\n<p>\nThat query produces the following result:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join.jpg\" alt=\"Example All-Cases for Left Semi Join\" title=\"Example All-Cases for Left Semi Join\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1350\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/all-cases-example-for-left-semi-join-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nAs you can see, every <span class=\"tt\">TblA<\/span> row is included with one exception: <span class=\"tt\">TblA_Val = 1<\/span> is missing because a row with <span class=\"tt\">TblB_Val = 1<\/span> does not exist in <span class=\"tt\">TblB<\/span>. You can also see that every <span class=\"tt\">TblA<\/span> row is included only once even so there are multiple rows in <span class=\"tt\">TblB<\/span> for values 4 and 5. Finally, even though the query is a <span class=\"tt\">SELECT * FROM<\/span> query, only columns from <span class=\"tt\">TblA<\/span> are included in the result.\n<\/p>\n<p>\nEach row from the left row source is included at most once. However, if there are true duplicate rows, all of them would be included. A semi join does not eliminate existing duplicates.\n<\/p>\n<h3>LEFT SEMI JOIN Syntax<\/h3>\n<p>\nAny join query that requests rows form the left row source based on the existence of rows in the right row source without including data from the right row source in the final result and without duplicating rows from the left row source is a logical left semi join. The <span class=\"tt\">EXISTS()<\/span> clause we saw in the above examples is the most prominent way to write a left semi join query.\n<\/p>\n<p>\nThe <span class=\"tt\">EXISTS()<\/span> clause is typically used in the <span class=\"tt\">WHERE<\/span> clause of a query but you can use it in other places like a <span class=\"tt\">CASE<\/span> statement too. You can place any valid sub-query inside the parenthesis. <span class=\"tt\">EXISTS()<\/span> evaluates to <span class=\"tt\">TRUE<\/span> if the sub-query returns at least on row.\n<\/p>\n<p>\nAs we will see in the next section, SQL Server does not always use a physical left semi join operator in these cases.\n<\/p>\n<h3>LEFT SEMI JOIN Operator<\/h3>\n<p>\nThere is no command for the left semi join. The SQL Server optimizer has the Left Semi Join operator as one option to choose from, and when the query allows for its use, a left semi join might or might not get chosen. There is very little we can do to influence that choice.\n<\/p>\n<p>\nThe operator of the first example query above is indeed a Left Semi Join operator:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan.jpg\" alt=\"Execution Plan for Left Semi Join Example\" title=\"Execution Plan for Left Semi Join Example\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1349\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-execution-plan-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nHowever, for the second example we get a totally different plan:\n<\/p>\n<p>\n<a href=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join.jpg\" alt=\"Execution Plan with Inner Join instead of Left Semi Join\" title=\"Execution Plan with Inner Join instead of Left Semi Join\" width=\"1093\" height=\"569\" class=\"aligncenter size-full wp-image-1351\" srcset=\"https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join.jpg 1093w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join-300x156.jpg 300w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join-1024x533.jpg 1024w, https:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/inner-join-instead-of-left-semi-join-150x78.jpg 150w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/a>\n<\/p>\n<p>\nInstead of using a Left Semi Join operator, SQL Server decided to use the combination of a Stream Aggregate operator and a normal Inner Join operator to achieve the same result.\n<\/p>\n<h3>Summary<\/h3>\n<p>\nThe typical use case for a logical left semi join is a query with an <span class=\"tt\">EXISTS()<\/span> clause. However, even though SQL Server has a physical Left Semi Join operator, it might not always use it.\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 Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.<\/p>\n<p> <a href=\"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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},"jetpack_post_was_ever_published":false},"categories":[28,29,5,27],"tags":[],"class_list":["post-1348","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.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Join A Day \u2013 The Left Semi Join - sqlity.net<\/title>\n<meta name=\"description\" content=\"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.\" \/>\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\/1348\/a-join-a-day-the-left-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 Semi Join - sqlity.net\" \/>\n<meta property=\"og:description\" content=\"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-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-12T15:00:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-13T18:53:09+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-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\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/\"},\"author\":{\"name\":\"Sebastian Meine\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"headline\":\"A Join A Day \u2013 The Left Semi Join\",\"datePublished\":\"2012-12-12T15:00:27+00:00\",\"dateModified\":\"2014-11-13T18:53:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/\"},\"wordCount\":848,\"commentCount\":1,\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-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\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/\",\"url\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/\",\"name\":\"A Join A Day \u2013 The Left Semi Join - sqlity.net\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-semi-join-example.jpg\",\"datePublished\":\"2012-12-12T15:00:27+00:00\",\"dateModified\":\"2014-11-13T18:53:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/#\\\/schema\\\/person\\\/bcffd8c572bc2f1bd10fdba80135e53c\"},\"description\":\"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-semi-join\\\/#primaryimage\",\"url\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-semi-join-example.jpg\",\"contentUrl\":\"http:\\\/\\\/sqlity.net\\\/wp-content\\\/uploads\\\/2012\\\/12\\\/left-semi-join-example.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/sqlity.net\\\/en\\\/1348\\\/a-join-a-day-the-left-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 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 Semi Join - sqlity.net","description":"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.","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\/1348\/a-join-a-day-the-left-semi-join\/","og_locale":"en_US","og_type":"article","og_title":"A Join A Day \u2013 The Left Semi Join - sqlity.net","og_description":"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.","og_url":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/","og_site_name":"sqlity.net","article_publisher":"https:\/\/www.facebook.com\/sqlity.net","article_published_time":"2012-12-12T15:00:27+00:00","article_modified_time":"2014-11-13T18:53:09+00:00","og_image":[{"url":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-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\/1348\/a-join-a-day-the-left-semi-join\/#article","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/"},"author":{"name":"Sebastian Meine","@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"headline":"A Join A Day \u2013 The Left Semi Join","datePublished":"2012-12-12T15:00:27+00:00","dateModified":"2014-11-13T18:53:09+00:00","mainEntityOfPage":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/"},"wordCount":848,"commentCount":1,"image":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/#primaryimage"},"thumbnailUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-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\/1348\/a-join-a-day-the-left-semi-join\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/","url":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/","name":"A Join A Day \u2013 The Left Semi Join - sqlity.net","isPartOf":{"@id":"https:\/\/sqlity.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/#primaryimage"},"image":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/#primaryimage"},"thumbnailUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg","datePublished":"2012-12-12T15:00:27+00:00","dateModified":"2014-11-13T18:53:09+00:00","author":{"@id":"https:\/\/sqlity.net\/en\/#\/schema\/person\/bcffd8c572bc2f1bd10fdba80135e53c"},"description":"The Left Semi Join is a half join: It only includes rows from the left side in the results. A typical example for a left semi join query is a statement containing the EXEISTS keyword. However, this does not always result in an execution plan with a Left Semi Join operator.","breadcrumb":{"@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-semi-join\/#primaryimage","url":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg","contentUrl":"http:\/\/sqlity.net\/wp-content\/uploads\/2012\/12\/left-semi-join-example.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/sqlity.net\/en\/1348\/a-join-a-day-the-left-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 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-lK","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/1348","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=1348"}],"version-history":[{"count":0,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/posts\/1348\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/media?parent=1348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/categories?post=1348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlity.net\/en\/wp-json\/wp\/v2\/tags?post=1348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}