{"id":5354,"date":"2015-08-28T08:36:49","date_gmt":"2015-08-28T06:36:49","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/"},"modified":"2015-08-28T08:36:49","modified_gmt":"2015-08-28T06:36:49","slug":"sql-server-2016-the-time-travel-with-temporal-table-part-iii","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/","title":{"rendered":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III"},"content":{"rendered":"<h2><\/h2>\n<h2>SELECT command<\/h2>\n<p>In this article, I present the last command SELECT.<br \/>\nI divide my article into 4 parts to be clearer and easier to read:<br \/>\n<a title=\"Part I - Principle &amp; Creation\" href=\"http:\/\/dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-i\/\" target=\"_blank\">Part I \u2013 Principle &amp; Creation<\/a><br \/>\n<a title=\"Part II \u2013 INSERT, UPDATE &amp; DELETE commands\" href=\"http:\/\/dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/\" target=\"_blank\">Part II \u2013 INSERT, UPDATE &amp; DELETE commands<\/a><br \/>\n<a title=\"Part III \u2013 SELECT command\" href=\"http:\/\/dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\" target=\"_blank\">Part III \u2013 SELECT command<\/a><br \/>\n<a title=\"Part IV \u2013 Maintenance &amp; Metadata\" href=\"http:\/\/dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iv\/\" target=\"_blank\">Part IV \u2013 Maintenance &amp; Metadata<\/a><\/p>\n<p>SQL Server version\/built used for this serie of articles is <strong>CTP 2.2\/13.0.407.1<\/strong><\/p>\n<h3>SELECT Command<\/h3>\n<p>In my sample, I search information of the number of African wild cat in the zoo.<br \/>\nI begin with a simple sample in my table:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SELECT * from [Zoo].[dbo].[Animals] WHERE Name='African wild cat'<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3338 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16.png\" alt=\"temporal16\" width=\"300\" height=\"90\" \/><\/a><br \/>\nThe associate query plan, indicates that a use of the clustered Index from my table without the history table. It is very important to know this for the next steps.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal17.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3339 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal17.png\" alt=\"temporal17\" width=\"300\" height=\"145\" \/><\/a><br \/>\nI have a look on the history table with a simple select on it:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal18.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3340 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal18.png\" alt=\"temporal18\" width=\"300\" height=\"112\" \/><\/a><br \/>\nAnd the query plan show the simple select on this table:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal19.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3341 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal19.png\" alt=\"temporal19\" width=\"300\" height=\"146\" \/><\/a><br \/>\nFor the select command, you have 4 options to retrieve historical data.<br \/>\nI go through these 4 options\u2026.<\/p>\n<h3>FOR SYSTEM_TIME AS OF \u2026<\/h3>\n<p>The first one is<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">FOR SYSTEM_TIME AS OF \"date_time\"<\/pre>\n<p>In my sample, you can see that this option gives the number of \u2018African wild cat\u2019 on a specific date.<br \/>\nTo be sure, I test between all updates.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal20.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3342 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal20.png\" alt=\"temporal20\" width=\"300\" height=\"216\" \/><\/a><br \/>\n<strong>Remarks:<\/strong> I have never joined the history table to my table. The join is automatically included in the SELECT query.<br \/>\nHave a look on the query plan.<br \/>\nIn this case, I search information stored on both table:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal30.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3348 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal30.png\" alt=\"temporal30\" width=\"300\" height=\"124\" \/><\/a><br \/>\nIn this case, I search the current information and I don\u2019t need to search in the History table but\u2026<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal31.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3349 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal31.png\" alt=\"temporal31\" width=\"300\" height=\"119\" \/><\/a><br \/>\nWith this option, the SELECT command go through both tables.<\/p>\n<h3>FOR SYSTEM_TIME FROM \u2026 TO \u2026<\/h3>\n<p>The second is<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">FOR SYSTEM_TIME FROM \"start_date_time\" TO \"end_date_time\"<\/pre>\n<p>You can see in my sample that you have all values between the periods that you enter<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal21.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3343 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal21.png\" alt=\"temporal21\" width=\"300\" height=\"193\" \/><\/a><br \/>\nI\u2019m a real tester and I inverse dates\u2026. In my mind, the result must give an error or no rows\u2026<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal22.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3344 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal22.png\" alt=\"temporal22\" width=\"300\" height=\"202\" \/><\/a><br \/>\nIn my 2 first queries, I have no response and no error message.<br \/>\nMy last query returns the current value\u2026<br \/>\nWhoa, I inverse the date and I have a result and no error message! It is good to know, isn\u2019t it?<\/p>\n<h3>FOR SYSTEM_TIME BETWEEN \u2026 AND \u2026<\/h3>\n<p>The third option is<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">FOR SYSTEM_TIME BETWEEN \"start_date_time\" AND \"end_date_time\"<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal23.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3345 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal23.png\" alt=\"temporal23\" width=\"300\" height=\"195\" \/><\/a><\/p>\n<p>You can see in my sample that you have all values between the periods that you enter.<\/p>\n<p>Like the second test, I inverse the dates\u2026<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal24.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3346 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal24.png\" alt=\"temporal24\" width=\"300\" height=\"196\" \/><\/a><\/p>\n<p>And I obtain the same result. No error or no message for the 2 first queries and the current result for my last query.<\/p>\n<h3>FOR SYSTEM_TIME CONTAINED IN (\u2026,\u2026)<\/h3>\n<p>The last option is<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">FOR SYSTEM_TIME CONTAINED IN (\"start_date_time\" , \"end_date_time\")<\/pre>\n<p><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal25.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3347 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal25.png\" alt=\"temporal25\" width=\"300\" height=\"161\" \/><\/a><\/p>\n<p>In my first query, I have a result. But for the two others, I have no rows. Why?<br \/>\nIn the Msdn page from Temporal Table and this option, you find the explanation \u201cRecords that became active exactly on the lower boundary or ceased being active exactly on the upper boundary are included.\u201d Also, the result is logic with my queries.<\/p>\n<h4>Select for a deleted Value<\/h4>\n<p>As you can see in the chapter delete in the <a title=\"Part II \u2013 INSERT, UPDATE &amp; DELETE commands\" href=\"http:\/\/dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/\" target=\"_blank\"> Part II <\/a>, I have deleted the 2015-08-26 the AnimalId \u201c3\u201d which are double in my table.<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal36.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3350 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal36.png\" alt=\"temporal36\" width=\"300\" height=\"155\" \/><\/a><\/p>\n<h2>CORE MESSAGE<\/h2>\n<ul>\n<li>The SELECT commands on a \u2018System-Versioned\u2019 Table have a classical query plan and don\u2019t go through the history table.<\/li>\n<li>But if you use the option FOR SYSTEM_TIME and one of the 4 options, the SELECT command join automatically the history table in all cases, even if it is not necessarily required.<\/li>\n<li>For options \u201cFOR SYSTEM_TIME BETWEEN \u2026 AND \u2026\u201d and \u201cFOR SYSTEM_TIME FROM \u2026 TO \u2026\u201d when the dates are inversed, the result does not returned every time \u2018no rows\u2019.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>SELECT command In this article, I present the last command SELECT. I divide my article into 4 parts to be clearer and easier to read: Part I \u2013 Principle &amp; Creation Part II \u2013 INSERT, UPDATE &amp; DELETE commands Part III \u2013 SELECT command Part IV \u2013 Maintenance &amp; Metadata SQL Server version\/built used for [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":5368,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[48],"tags":[49,51,566,625],"type_dbi":[],"class_list":["post-5354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-survey","tag-microsoft","tag-sql-server","tag-sql-server-2016","tag-temporal-table"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2016: the Time Travel with temporal table \u2013 Part III - dbi Blog<\/title>\n<meta name=\"description\" content=\"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2016: the Time Travel with temporal table \u2013 Part III\" \/>\n<meta property=\"og:description\" content=\"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-28T06:36:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"593\" \/>\n\t<meta property=\"og:image:height\" content=\"177\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Haby\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Haby\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\"},\"author\":{\"name\":\"St\u00e9phane Haby\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"headline\":\"SQL Server 2016: the Time Travel with temporal table \u2013 Part III\",\"datePublished\":\"2015-08-28T06:36:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\"},\"wordCount\":594,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png\",\"keywords\":[\"Microsoft\",\"SQL Server\",\"SQL Server 2016\",\"Temporal Table\"],\"articleSection\":[\"Technology Survey\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\",\"name\":\"SQL Server 2016: the Time Travel with temporal table \u2013 Part III - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png\",\"datePublished\":\"2015-08-28T06:36:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\"},\"description\":\"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png\",\"width\":593,\"height\":177},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2016: the Time Travel with temporal table \u2013 Part III\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b\",\"name\":\"St\u00e9phane Haby\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g\",\"caption\":\"St\u00e9phane Haby\"},\"description\":\"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III - dbi Blog","description":"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.","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:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III","og_description":"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/","og_site_name":"dbi Blog","article_published_time":"2015-08-28T06:36:49+00:00","og_image":[{"width":593,"height":177,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png","type":"image\/png"}],"author":"St\u00e9phane Haby","twitter_card":"summary_large_image","twitter_misc":{"Written by":"St\u00e9phane Haby","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/"},"author":{"name":"St\u00e9phane Haby","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"headline":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III","datePublished":"2015-08-28T06:36:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/"},"wordCount":594,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png","keywords":["Microsoft","SQL Server","SQL Server 2016","Temporal Table"],"articleSection":["Technology Survey"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/","name":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png","datePublished":"2015-08-28T06:36:49+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"description":"After the second part of the temporal table of the 3 commands: INSERT, UPDATE and DELETE, this article presents the SELECT Command with the option FOR SYSTEM_TIME.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal16-1.png","width":593,"height":177},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-iii\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2016: the Time Travel with temporal table \u2013 Part III"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b","name":"St\u00e9phane Haby","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1123227ca39a5dca608c0f72d23cd1904fee29979749bbb3a485b9438436c553?s=96&d=mm&r=g","caption":"St\u00e9phane Haby"},"description":"St\u00e9phane Haby has more than ten years of experience in Microsoft solutions. He is specialized in SQL Server technologies such as installation, migration, best practices, and performance analysis etc. He is also an expert in Microsoft Business Intelligence solutions such as SharePoint, SQL Server and Office. Futhermore, he has many years of .NET development experience in the banking sector and other industries. In France, he was one of the first people to have worked with Microsoft Team System. He has written several technical articles on this subject. St\u00e9phane Haby is Microsoft Most Valuable Professional (MVP) as well as Microsoft Certified Solutions Associate (MCSA) and\u00a0Microsoft Certified Solutions Expert (MCSE) for SQL Server 2012. He is also Microsoft Certified Technology Specialist (MCTS) and Microsoft Certified IT Professional (MCITP) for SQL Server 2008 as well as ITIL Foundation V3 certified. He holds a Engineer diploma in industrial computing and automation from France. His branch-related experience covers Chemicals &amp; Pharmaceuticals, Banking \/ Financial Services, and many other industries.","url":"https:\/\/www.dbi-services.com\/blog\/author\/stephane-haby\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=5354"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5354\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/5368"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=5354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=5354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=5354"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=5354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}