{"id":5331,"date":"2015-08-28T07:49:40","date_gmt":"2015-08-28T05:49:40","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/"},"modified":"2015-08-28T07:49:40","modified_gmt":"2015-08-28T05:49:40","slug":"sql-server-2016-the-time-travel-with-temporal-table-part-ii","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/","title":{"rendered":"SQL Server 2016: the Time Travel with temporal table \u2013 Part II"},"content":{"rendered":"<h2><\/h2>\n<h2>INSERT, UPDATE &amp; DELETE commands<\/h2>\n<p>After the introduction and the table creation, in this second part, I present the 3 important commands INSERT, UPDATE &amp; DELETE.<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>INSERT Command<\/h3>\n<p>The Insert is like a \u2018normal\u2019 insert:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">INSERT INTO [Zoo].[dbo].[Animals]([Name],[Genus Species],[Number])\n     VALUES('African wild cat','Felis silvestris lybica',10)\nGO<\/pre>\n<p>I check quickly both tables and I can see that animals has my new row and the History table AnimalsHistory is empty.<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3316 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06.png\" alt=\"temporal06\" width=\"300\" height=\"232\" \/><\/a><\/strong><\/h2>\n<p>Can I insert a row and specified the Start Date?<br \/>\nI test\u2026and the result:<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal07.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3317 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal07.png\" alt=\"temporal07\" width=\"300\" height=\"64\" \/><\/a><\/strong><\/h2>\n<p>Ooooups! I cannot insert a row with a specific Start Date.<br \/>\nThe other way is to add a default value for the Start Date and to insert my line with a constraint:<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal08.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3318 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal08.png\" alt=\"temporal08\" width=\"300\" height=\"144\" \/><\/a><\/strong><\/h2>\n<p>But the result indicates the correct insert date and time, and not my default value.<br \/>\nI precise the default in the Start Date in my next insert:<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal09.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3319 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal09.png\" alt=\"temporal09\" width=\"300\" height=\"159\" \/><\/a><\/strong><\/h2>\n<p>And I have NOT my default Start Date\u2026<\/p>\n<p>A fun thing\u2026 that I remark is the Time in my Start Time is delayed from 2 hours.\u00a0 Indeed, the time is set to the UTC Time (<a title=\"MSDN link to temporal Table\" href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dn935015.aspx\" target=\"_blank\">documented in the msdn<\/a>). Don\u2019t forget it when you want be precise to retrieve data in a point in time.<\/p>\n<h2><\/h2>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal10.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3320 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal10.png\" alt=\"temporal10\" width=\"300\" height=\"223\" \/><\/a><\/strong><\/h2>\n<p>My conclusion for the INSERT is very simple, you can just insert from your actual date and you cannot define your Start Date.<br \/>\nI insert with a script all animals that I wish for my zoo.<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3321 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11.png\" alt=\"temporal11\" width=\"300\" height=\"264\" \/><\/a><\/strong><\/h2>\n<p>But I must update the number when the species arrived\u2026.<\/p>\n<h3>UPDATE Command<\/h3>\n<p>The update command is like a standard update for your line:<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11a.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3322 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11a.png\" alt=\"temporal11a\" width=\"300\" height=\"70\" \/><\/a><\/strong><\/h2>\n<p>You can notice that the update has 2 rows affected\u2026<br \/>\nAnd in the query plan, you can notice that you have a Update of the table Animals and an Insert in the table AnimalsHistory:<\/p>\n<p><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11b.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3323 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal11b.png\" alt=\"temporal11b\" width=\"300\" height=\"73\" \/><\/a><\/strong><\/p>\n<p>To create an update for all lines, I use the command:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">SELECT 'UPDATE [Zoo].[dbo].[Animals] SET Number = '+ CONVERT(varchar(10),CAST(RAND(CHECKSUM(NEWID())) * 50 as INT) + 1)  \n+' WHERE Name = '''+ Name + ''' AND  [Genus Species]= ''' + [Genus Species] +''';WAITFOR DELAY ''00:05'';'\n FROM [Zoo].[dbo].[Animals]<\/pre>\n<p>The command \u201cCAST(RAND(CHECKSUM(NEWID())) * 50 as INT) + 1\u201d gives a random number from 1 to 50.<br \/>\nI run all update at different time 5 minutes for all rows with a WAITFOR DELAY &#8217;00:05&#8242;;<br \/>\nThen queries are like:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">UPDATE [Zoo].[dbo].[Animals] SET Number = 21 WHERE Name = 'African wild cat' AND  [Genus Species]= 'Felis silvestris lybica';WAITFOR DELAY '00:05';\nUPDATE [Zoo].[dbo].[Animals] SET Number = 28 WHERE Name = 'Alligator' AND  [Genus Species]= 'Alligator mississippiensis';WAITFOR DELAY '00:05';\nUPDATE [Zoo].[dbo].[Animals] SET Number = 32 WHERE Name = 'Alligator' AND  [Genus Species]= 'Alligator mississippiensis';WAITFOR DELAY '00:05';\n<\/pre>\n<p>After a long time, I run a SELECT on both tables:<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal12.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3324 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal12.png\" alt=\"temporal12\" width=\"300\" height=\"289\" \/><\/a><\/strong><\/h2>\n<p>In the table Animals, I have all rows \u201cup to date\u201d and in my history table, I have all old values historicized.<\/p>\n<h3>DELETE Command<\/h3>\n<p>For the delete, the row is deleted from your table like a standard delete. The value is stored in the History Table with an End Date and Time, when the delete command is running.<br \/>\nIn my sample, I have two rows with Alligator and I delete the AnimalID \u201c3\u201d.<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal26.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3325 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal26.png\" alt=\"temporal26\" width=\"300\" height=\"198\" \/><\/a><\/strong><\/h2>\n<p>If we have a look on the query plan, we can see both operation (delete on the table and insert on the history table):<\/p>\n<h2><strong><a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal27.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-3326 aligncenter\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal27.png\" alt=\"temporal27\" width=\"300\" height=\"51\" \/><\/a><\/strong><\/h2>\n<p>Like every time, it is easy to delete \ud83d\ude09<\/p>\n<h2>CORE MESSAGE<\/h2>\n<ul>\n<li>It is easy to insert DATA in the table, as it is the classical way.<\/li>\n<li>But, you cannot force the Start Date and Time.<\/li>\n<li>The <strong>Start Date and Time is set to the UTC Time<\/strong>. Don\u2019t forget to add the Offset when you will select data from a point in time.<\/li>\n<li>The update is like a standard update and the old value is stored in the Historic table.<\/li>\n<li>Like the update, delete is like a standard delete, and the value is stored in the Historic table with an End Date and Time when the delete was executed.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>INSERT, UPDATE &amp; DELETE commands After the introduction and the table creation, in this second part, I present the 3 important commands INSERT, UPDATE &amp; DELETE. 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 [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":5343,"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-5331","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.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server 2016: the Time Travel with temporal table \u2013 Part II - dbi Blog<\/title>\n<meta name=\"description\" content=\"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE\" \/>\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-ii\/\" \/>\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 II\" \/>\n<meta property=\"og:description\" content=\"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-08-28T05:49:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"658\" \/>\n\t<meta property=\"og:image:height\" content=\"509\" \/>\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-ii\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/\"},\"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 II\",\"datePublished\":\"2015-08-28T05:49:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/\"},\"wordCount\":593,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/temporal06-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-ii\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/\",\"name\":\"SQL Server 2016: the Time Travel with temporal table \u2013 Part II - 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-ii\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/temporal06-1.png\",\"datePublished\":\"2015-08-28T05:49:40+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0bfb7484ae81c8980fc2b11334f803b\"},\"description\":\"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/temporal06-1.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/temporal06-1.png\",\"width\":658,\"height\":509},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\\\/#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 II\"}]},{\"@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 II - dbi Blog","description":"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE","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-ii\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2016: the Time Travel with temporal table \u2013 Part II","og_description":"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/","og_site_name":"dbi Blog","article_published_time":"2015-08-28T05:49:40+00:00","og_image":[{"width":658,"height":509,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-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-ii\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/"},"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 II","datePublished":"2015-08-28T05:49:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/"},"wordCount":593,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-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-ii\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/","name":"SQL Server 2016: the Time Travel with temporal table \u2013 Part II - 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-ii\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-1.png","datePublished":"2015-08-28T05:49:40+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/d0bfb7484ae81c8980fc2b11334f803b"},"description":"This second part of the temporal table present the 3 commands: INSERT, UPDATE and DELETE","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-1.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/temporal06-1.png","width":658,"height":509},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-2016-the-time-travel-with-temporal-table-part-ii\/#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 II"}]},{"@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\/5331","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=5331"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/5331\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/5343"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=5331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=5331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=5331"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=5331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}