<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1908424108349367499</id><updated>2023-03-15T08:49:16.447-07:00</updated><category term="SQL Server"/><category term="SQL"/><category term="J Query"/><category term="SSIS"/><title type='text'>All About SQL Server, T-SQL</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-4231615405695547459</id><published>2023-03-15T08:48:00.002-07:00</published><updated>2023-03-15T08:48:15.034-07:00</updated><title type='text'> Exception Handling RAISEERROR, TRY- CATCH</title><content type='html'>&lt;p&gt;Exception handling is an essential aspect of any programming language, including T-SQL, the language used in Microsoft SQL Server. In this blog, we will discuss the basics of exception handling in T-SQL, including how to raise and catch exceptions, and best practices for handling errors in SQL Server.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;What is an Exception in T-SQL?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;An exception is an error condition that occurs during the execution of a T-SQL statement. When an exception occurs, the SQL Server engine raises an error message that provides details about the error, including the error number, severity, and message text. These error messages can be viewed in the SQL Server error log, or they can be returned to the client application that issued the T-SQL statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;How to Raise an Exception in T-SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In T-SQL, you can raise an exception by using the RAISERROR statement. The RAISERROR statement allows you to specify an error message, error number, severity level, and state. For example, the following code raises an exception with an error message and error number:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;RAISERROR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Error message&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 16&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this example, the error message is &#39;Error message&#39;, the error number is 16, and the severity level is 1. The severity level can range from 1 to 25, with 1 being the least severe and 25 being the most severe.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;How to Catch an Exception in T-SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In T-SQL, you can catch exceptions by using the TRY...CATCH construct. The TRY...CATCH construct allows you to specify a block of code to try, and a block of code to catch any exceptions that occur during the try block. For example, the following code uses a TRY...CATCH block to catch and handle exceptions:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TRY&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- Code to try&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TRY&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CATCH&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- Code to handle exception&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CATCH&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this example, the code to try is contained within the BEGIN TRY and END TRY block, and the code to handle the exception is contained within the BEGIN CATCH and END CATCH block. If an exception occurs during the try block, the code in the catch block is executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Here are some best practices for handling exceptions in T-SQL:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot;&gt;Always use the TRY...CATCH construct to catch and handle exceptions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use descriptive error messages to make it easier to troubleshoot issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use the appropriate severity level for each error. Use lower severity levels for less severe errors and higher severity levels for more severe errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot;&gt;Avoid catching exceptions at the highest level of your code. Instead, catch exceptions at the appropriate level, and allow higher-level code to handle exceptions that cannot be handled at lower levels.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot;&gt;Always include an error-handling section in stored procedures and other T-SQL code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Exception handling is an important aspect of any programming language, including T-SQL. By understanding how to raise and catch exceptions, and by following best practices for handling errors in SQL Server, you can make your T-SQL code more robust and reliable.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/4231615405695547459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/exception-handling-raiseerror-try-catch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/4231615405695547459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/4231615405695547459'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/exception-handling-raiseerror-try-catch.html' title=' Exception Handling RAISEERROR, TRY- CATCH'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-5324534026293213004</id><published>2023-03-15T08:47:00.002-07:00</published><updated>2023-03-15T08:47:33.023-07:00</updated><title type='text'>Temporary Tables in SQL server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Temporary Tables in SQL server&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In SQL Server, temporary tables are a type of table that is created and used for a specific session or connection. They are used to store data temporarily that can be used for later processing or analysis. Temporary tables can be created in two ways: local and global. In this blog, we will discuss both types of temporary tables and their usage in SQL Server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Local Temporary Tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;A local temporary table is a table that is created within the current connection and is only available to the session that created it. It is automatically dropped when the session is closed. The table name begins with a single hash (#) sign. Here is an example of how to create a local temporary table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; #TempTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ID &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRIMARY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Age &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In the above example, we have created a local temporary table named #TempTable with three columns: ID, Name, and Age. Once the table is created, we can insert data into it using the INSERT INTO statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; #TempTable&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Age&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VALUES &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;John Doe&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 30&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Jane Smith&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 25&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Bob Johnson&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 40&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;After inserting data, we can retrieve the data from the temporary table using a SELECT statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; #TempTable&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Global Temporary Tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;A global temporary table is a table that is created within the current session, but it is available to all sessions. It is dropped when all sessions referencing it have closed. The table name begins with two hash (##) signs. Here is an example of how to create a global temporary table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ##TempTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ID &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRIMARY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Age &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In the above example, we have created a global temporary table named ##TempTable with three columns: ID, Name, and Age. Once the table is created, we can insert data into it using the INSERT INTO statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ##TempTable&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Age&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VALUES &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;John Doe&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 30&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Jane Smith&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 25&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Bob Johnson&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 40&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;After inserting data, we can retrieve the data from the global temporary table using a SELECT statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; ##TempTable&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporary Tables with SELECT INTO:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Another way to create temporary tables is by using the SELECT INTO statement. This statement creates a new table with the same structure as the result set returned by a SELECT statement. Here is an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; ID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; Age &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; #TempTable &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; Employees&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In the above example, we have created a local temporary table named #TempTable by selecting data from an existing table named Employees. The new table has the same structure as the Employees table, and the data is copied into it. Once the table is created, we can manipulate the data in the same way as any other table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;SQL Server temporary tables are a useful feature that allows you to create tables that exist only for the duration of a session or transaction. Like any feature, there are both advantages and disadvantages to using temporary tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Pros:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporary tables can be used to store intermediate results during complex query processing. This can help improve query performance and reduce the number of round trips between the client and server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;They allow you to break down complex queries into smaller, more manageable steps. This can make queries easier to understand and debug.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporary tables are often used in stored procedures to store data for later use. This can be useful when working with large amounts of data or when you need to reuse the same data across multiple queries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Since temporary tables are only visible within the current session or transaction, they can help to reduce naming conflicts between different users and applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Cons:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporary tables can increase disk usage and memory consumption, especially when working with large datasets. This can lead to performance issues and may require additional resources to manage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;They can also be a source of contention when multiple users or applications are working with the same set of temporary tables. This can lead to issues with locking and blocking, which can impact query performance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Since temporary tables are only visible within the current session or transaction, they cannot be used to share data between different sessions or transactions. This can make it more difficult to write code that relies on shared data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporary tables can be more difficult to manage and maintain than regular tables. They require more attention to ensure that they are created and dropped at the appropriate times, and that they are not causing performance issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Overall, temporary tables are a useful feature that can help improve query performance and simplify complex queries. However, they should be used judiciously, and you should be aware of their potential downsides.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/5324534026293213004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/temporary-tables-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5324534026293213004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5324534026293213004'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/temporary-tables-in-sql-server.html' title='Temporary Tables in SQL server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-3232608936431707645</id><published>2023-03-14T12:14:00.000-07:00</published><updated>2023-03-14T12:14:03.592-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Conditional Statements in SQL Server – IF, ELSE, WHILE,CASE &amp; CHOOSE</title><content type='html'>&lt;p&gt;&amp;nbsp;T-SQL, or Transact-SQL, is a procedural programming language used in Microsoft SQL Server. It provides several conditional statements that allow users to create decision-making processes based on specific conditions. These statements include IF...ELSE, CASE, and CHOOSE.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;In this blog, we will explore these conditional statements in T-SQL and their usage.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;IF...ELSE Statement:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;The IF...ELSE statement is used to execute a particular set of SQL statements if a certain condition is true or false. It has the following syntax:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; condition&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed if condition is true &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed if condition is false &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;In this syntax, the condition is a logical expression that evaluates to either true or false. If the condition is true, the statement or block of statements inside the BEGIN and END keywords will be executed. If the condition is false, the statement or block of statements inside the ELSE clause will be executed.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Let&#39;s take a look at an example to better understand the usage of the IF-ELSE statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @number &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 10 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; @number &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; 0&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;The number is positive&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;The number is negative or zero&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;In this example, the condition is @number &amp;gt; 0, which is true since @number is 10. Therefore, the statement inside the BEGIN and END keywords after the IF keyword will be executed, which is to print &quot;The number is positive&quot;.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;You can also use the IF-ELSE statement with multiple conditions by using the ELSE IF clause. The syntax for the ELSE IF clause is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; condition1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed if condition1 is true &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; condition2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed if condition2 is true &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed if all conditions are false &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Let&#39;s take a look at an example that uses the ELSE IF clause:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @number &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; @number &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; 0&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;The number is positive&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @number &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;The number is negative&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;The number is zero&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;In this example, the condition @number &amp;gt; 0 is false since @number is 0. Therefore, the ELSE IF clause will be evaluated, and the condition @number &amp;lt; 0 will also be false. Finally, the ELSE clause will be executed, which prints &quot;The number is zero&quot;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;CASE Statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The CASE statement is used to create multiple conditions in a single SQL statement. It has two variations: the simple CASE and the searched CASE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The simple CASE statement has the following syntax:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CASE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;expression&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; value1 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; result1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; value2 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; result2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; resultN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Here, expression is the value that we want to evaluate. If it matches any of the valueX, then the corresponding resultX is returned. If none of the values match, then the ELSE block is executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;For example, consider a table product that contains the details of products and their prices. We can use the CASE statement to categorize the products based on their prices.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; price&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CASE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; price &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 100 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Low Price&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; price &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 100 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; price &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 500 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Medium Price&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;High Price&#39;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; price_category&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; product&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Here, the CASE statement evaluates the price of each product and categorizes it as Low Price, Medium Price, or High Price.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The searched CASE statement has a similar syntax but uses Boolean expressions instead of values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CASE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; boolean_expression1 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; result1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; boolean_expression2 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;THEN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; result2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ELSE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; resultN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;CHOOSE Statement:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The CHOOSE statement is used to select a value from a list of expressions based on an index. It has the following syntax:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;CHOOSE&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;index&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; value1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; value2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;...,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; valueN&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Here, index is the position of the value that we want to select, and valueX is the list of expressions from which we want to select.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;For example, consider the following query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;CHOOSE&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;apple&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;banana&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;orange&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Here, the CHOOSE statement selects the value banana as it is in the second position in the list of expressions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;WHILE loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In SQL Server, the WHILE loop is a control flow statement that allows you to repeatedly execute a block of statements as long as a specific condition is true. It is a powerful feature of T-SQL that is commonly used in various database applications. This blog will cover the usage of the WHILE loop in SQL Server and how it can be used to write effective code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The syntax for the WHILE loop is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHILE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;condition &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed as long as condition is true &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this syntax, the condition is a logical expression that evaluates to either true or false. As long as the condition is true, the statement or block of statements inside the BEGIN and END keywords will be executed repeatedly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Let&#39;s take a look at an example to better understand the usage of the WHILE loop:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHILE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 10 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this example, the condition is @count &amp;lt;= 10, which is true since @count is initially 1. Therefore, the statement inside the BEGIN and END keywords after the WHILE keyword will be executed, which is to print the value of @count. The value of @count is then incremented by 1 using the SET statement. The loop will continue to execute as long as @count is less than or equal to 10.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;You can also use the WHILE loop with multiple conditions by using the logical operators AND and OR. The syntax for using logical operators in the WHILE loop is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHILE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;condition1 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AND/OR&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; condition2 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AND/OR&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; condition3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- statement or block of statements executed as long as all conditions are true &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Let&#39;s take a look at an example that uses logical operators in the WHILE loop:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @flag &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;bit&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHILE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 10 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @flag &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @count &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 6 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @flag &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;In this example, the WHILE loop executes as long as @count is less than or equal to 10 AND @flag is equal to 1. Inside the loop, the value of @count is printed and incremented by 1 using the SET statement. If @count is equal to 6, the value of @flag is set to 0, which will cause the loop to exit after the current iteration.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/3232608936431707645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/conditional-statements-in-sql-server-if.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3232608936431707645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3232608936431707645'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/conditional-statements-in-sql-server-if.html' title='Conditional Statements in SQL Server – IF, ELSE, WHILE,CASE &amp; CHOOSE'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-5481398635577443128</id><published>2023-03-14T12:11:00.004-07:00</published><updated>2023-03-14T12:11:44.944-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>INSERT and UPDATE Statements in SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;SQL Server is a powerful database management system that allows you to manipulate and manage data in your databases. Two of the most commonly used SQL statements are INSERT and UPDATE, which are used to add new data to a table and modify existing data, respectively. In this blog post, we will explore the syntax and usage of these two statements in SQL Server.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;INSERT Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;The INSERT statement is used to add new data to a table in SQL Server. The basic syntax of the INSERT statement is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; table_name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;column1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column3&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;VALUES &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt;value1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; value2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; value3&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;...);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this syntax, table_name is the name of the table where the data will be inserted, and column1, column2, column3, etc. are the names of the columns in the table where the data will be inserted. The VALUES clause contains the actual data to be inserted into the table, in the same order as the columns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Here is an example of an INSERT statement that adds a new record to a table called employees:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; employees&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;first_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; last_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; age&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; salary&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;VALUES &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;John&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Doe&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 30&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 50000&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this example, we are inserting a new employee record with the first name &#39;John&#39;, last name &#39;Doe&#39;, age 30, and salary $50,000 into the employees table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;UPDATE Statement&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;The UPDATE statement is used to modify existing data in a table in SQL Server. The basic syntax of the UPDATE statement is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; table_name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column1 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column2 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; condition&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this syntax, table_name is the name of the table where the data will be updated, column1, column2, etc. are the names of the columns to be updated, and value1, value2, etc. are the new values for the columns. The WHERE clause specifies the condition that must be met for the update to take place.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Here is an example of an UPDATE statement that modifies an existing record in the employees table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; salary &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; 60000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; last_name &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Doe&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this example, we are updating the salary of all employees with the last name &#39;Doe&#39; to $60,000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Best Practices for Writing INSERT and UPDATE Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;To write efficient and maintainable INSERT and UPDATE statements in SQL Server, you should follow these best practices:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use parameterized queries:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; Use parameterized queries to prevent SQL injection attacks and improve performance. Parameterized queries allow you to pass parameters to a query instead of concatenating values into the query string.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Validate user input:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; Always validate user input to prevent SQL injection attacks and ensure that only valid data is inserted or updated in the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use transactions:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; Use transactions to ensure that multiple INSERT and UPDATE statements are executed as a single atomic operation. This helps to maintain the integrity of the data and prevent data corruption.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use indexes:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; Use indexes to improve query performance. Indexes can speed up data retrieval by allowing the database engine to quickly locate the data that is required for a query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Notes:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;The INSERT and UPDATE statements are powerful tools for manipulating data in SQL Server. By following best practices and writing efficient code, you can use these statements to add new data to a table and modify existing data in a way that meets the needs of your application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Methods to insert and Update the Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In SQL Server, there are two primary ways to update or insert data into a table: row-by-row and set-based. In this blog post, we will explore the concept of set-based operations, and how they can be used to improve the efficiency and performance of update and insert statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Row-By-Row vs Set-Based Operations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Traditionally, SQL Server has executed update and insert statements on a row-by-row basis. This means that the statement is executed once for each row that needs to be updated or inserted. While this approach is simple to understand and easy to implement, it can be very inefficient for large data sets.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Set-based operations, on the other hand, process all rows that meet a certain condition at once, using a single statement. This can greatly improve performance, as SQL Server can take advantage of optimizations such as parallel processing and optimized data access to complete the operation much faster.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Set-Based Update&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;A set-based update operation updates multiple rows in a single statement, based on a condition or set of conditions. The basic syntax of a set-based update statement is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; table_name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column1 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column2 &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; condition&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this syntax, table_name is the name of the table to be updated, column1, column2, etc. are the columns to be updated, and value1, value2, etc. are the new values for the columns. The WHERE clause specifies the condition that must be met for the update to occur.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;For example, consider a table employees with columns employee_id, first_name, last_name, and salary. To give all employees with a salary less than $50,000 a raise of 10%, we could use the following set-based update statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; salary &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; salary &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; 1.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; salary &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 50000&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Set-Based Insert&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;A set-based insert operation inserts multiple rows in a single statement, typically by selecting data from another table or using a set of hard-coded values. The basic syntax of a set-based insert statement is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; table_name&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;column1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; column2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; value2&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;source_table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; condition&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In this syntax, table_name is the name of the table to insert data into, column1, column2, etc. are the columns to be inserted, and value1, value2, etc. are the values to be inserted. The SELECT statement specifies the data source for the insert, and the WHERE clause specifies any conditions that must be met for the insert to occur.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;For example, consider a table employees with columns employee_id, first_name, last_name, and salary. To insert a new employee record for all employees with a salary less than $50,000, we could use the following set-based insert statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INTO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; employees&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;first_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; last_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; salary&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;first_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; last_name&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; 50000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; salary &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; line-height: 107%;&quot;&gt; 50000&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;This statement selects all employees with a salary less than $50,000 from the employees table and inserts a new record for each employee into the same table, with a salary of $50,000.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/5481398635577443128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/insert-and-update-statements-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5481398635577443128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5481398635577443128'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/insert-and-update-statements-in-sql.html' title='INSERT and UPDATE Statements in SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-1839914876430982425</id><published>2023-03-13T10:46:00.003-07:00</published><updated>2023-03-13T10:46:32.748-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>ORDER BY Clause - SQL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Order BY Clause&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The ORDER BY clause is a critical part of the SQL SELECT statement that allows you to sort the result set of a query. In this blog post, we will explore the ORDER BY clause in more detail, including its syntax, common use cases, and best practices for writing efficient queries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The basic syntax of the SELECT statement with ORDER BY clause is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [table1]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;[JOIN table2 ON condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;HAVING&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...] [ASC|DESC]&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The ORDER BY clause comes at the end of the SELECT statement, after the WHERE, GROUP BY, and HAVING clauses (if they are present). It allows you to specify one or more columns by which the result set should be sorted, along with the direction of the sort (either ascending or descending).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Common Use Cases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The ORDER BY clause can be used in many different ways to sort data, including:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Single column sort:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To sort the result set by a single column, simply specify the column name in the ORDER BY clause. For example, ORDER BY column1 ASC will sort the result set by column1 in ascending order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Multiple column sort:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To sort the result set by multiple columns, separate the column names with commas in the ORDER BY clause. For example, ORDER BY column1 ASC, column2 DESC will sort the result set first by column1 in ascending order, and then by column2 in descending order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Sorting by expression:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; You can also sort the result set based on an expression, such as ORDER BY column1 + column2 DESC to sort the result set by the sum of column1 and column2 in descending order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Sorting by position:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; You can also sort the result set by the position of the column in the SELECT list, such as ORDER BY 2 ASC to sort the result set by the second column in ascending order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Best Practices&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;When using the ORDER BY clause in SQL Server, there are several best practices you should follow to ensure that your queries are efficient and maintainable:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the ORDER BY clause to sort the result set in the database, rather than in the application layer. Sorting data in the database can be much faster than sorting it in the application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the most selective column first in the ORDER BY clause. The more selective the column, the fewer rows need to be sorted, which can improve performance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use indexes to optimize queries with large datasets.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the TOP clause to limit the number of rows returned if you only need a subset of the result set.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the OFFSET and FETCH clauses to paginate the result set if you need to display data in pages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The ORDER BY clause is a powerful tool that allows you to sort the result set of a SQL SELECT statement in many different ways. By following best practices and writing efficient queries, you can use the ORDER BY clause to retrieve and manipulate data in powerful and useful ways.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reference&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/1839914876430982425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/order-by-clause-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/1839914876430982425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/1839914876430982425'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/order-by-clause-sql.html' title='ORDER BY Clause - SQL'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-8078039782869402764</id><published>2023-03-13T10:25:00.003-07:00</published><updated>2023-03-13T22:58:01.084-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>WHERE Clause - SQL </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;WHERE Clause&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The WHERE clause is a crucial part of the SELECT statement in SQL Server. It is used to filter the data retrieved from one or more tables based on a specified condition. In this blog post, we will explore the WHERE clause in more detail, including its syntax, common use cases, and some best practices for writing efficient queries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The basic syntax of the SELECT statement with WHERE clause is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [table1]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;[JOIN table2 ON condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;HAVING&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...] [ASC|DESC]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;As you can see, the WHERE clause comes after the FROM and JOIN clauses, but before the GROUP BY, HAVING, and ORDER BY clauses. The condition in the WHERE clause can be a simple comparison, such as column1 = &#39;value&#39;, or a more complex expression involving logical operators such as AND, OR, and NOT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Common Use Cases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The WHERE clause can be used in a variety of ways to filter data, including:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Basic comparisons:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To filter data based on a simple comparison, such as column1 = &#39;value&#39;, column2 &amp;gt; 10, or column3 &amp;lt;&amp;gt; &#39;other value&#39;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Multiple conditions:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To filter data based on multiple conditions, use logical operators such as AND, OR, and NOT. For example, column1 = &#39;value&#39; AND column2 &amp;gt; 10 will only retrieve rows where both conditions are true.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Wildcard characters:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To filter data based on partial matches, use wildcard characters such as % and _ in your condition. For example, column1 LIKE &#39;value%&#39; will retrieve rows where column1 starts with &#39;value&#39;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Subqueries:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To filter data based on a subquery, use the IN or EXISTS operators. For example, column1 IN (SELECT column2 FROM table2) will retrieve rows where column1 matches any value in the specified column from table2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Null values:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To filter data based on null values, use the IS NULL or IS NOT NULL operators. For example, column1 IS NULL will retrieve rows where column1 is null.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Best Practices&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;When using the WHERE clause with SELECT statements, there are several best practices you should follow to ensure that your queries are efficient and maintainable:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the most specific condition possible to filter the data. The more specific the condition, the fewer rows need to be retrieved, which can improve performance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use indexes to optimize queries with large datasets.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the EXISTS operator instead of the IN operator for subqueries with large datasets, as it can be faster.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Avoid using functions in the WHERE clause, as they can slow down performance. If possible, pre-calculate the value of the function and use that in your condition instead.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use parentheses to group conditions for clarity and to ensure the correct order of operations.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;The WHERE clause is a powerful tool that allows you to filter the data retrieved by SELECT statements based on a specified condition. By following best practices and writing efficient queries, you can use the WHERE clause to retrieve and manipulate data in powerful and useful ways.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reference &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/t-sql/queries/where-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/8078039782869402764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/where-clause-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8078039782869402764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8078039782869402764'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/where-clause-sql.html' title='WHERE Clause - SQL '/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-8624452186152867310</id><published>2023-03-13T10:23:00.005-07:00</published><updated>2023-03-13T10:26:04.170-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SELECT Clause - SQL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;SELECT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT is a fundamental SQL statement that is used to retrieve data from one or more tables in a SQL Server database. In this blog post, we will explore the SELECT statement in more detail, including its syntax, common use cases, and some best practices for writing efficient queries.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Syntax&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;The basic syntax of the SELECT statement is as follows:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; [column1, column2, ...]&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [table1]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;[JOIN table2 ON condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;HAVING&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [condition]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; [column1, column2, ...] [ASC|DESC]&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;Let&#39;s break down each of these components:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;SELECT: This keyword is used to specify which columns we want to retrieve from the database.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;FROM: This keyword specifies the table or tables from which we want to retrieve data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;JOIN: This keyword is used to join two or more tables together based on a specified condition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;WHERE: This keyword is used to filter the data based on a specified condition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;GROUP BY: This keyword is used to group the data based on one or more columns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;HAVING: This keyword is used to filter the data based on a specified condition after grouping.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;ORDER BY: This keyword is used to sort the data based on one or more columns, either in ascending (ASC) or descending (DESC) order.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;b&gt;Common Use Cases&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;SELECT statements can be used for a variety of purposes, including:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Retrieving all columns from a table: &lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt;To retrieve all columns from a table, simply use the * wildcard character after the SELECT keyword, like this: SELECT * FROM table1.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Retrieving specific columns from a table: To retrieve specific columns from a table, list the column names after the &lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;SELECT keyword, separated by commas, like this: SELECT column1, column2 FROM table1.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Filtering data:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot;&gt; To retrieve only the rows that meet a certain condition, use the WHERE keyword, like this: SELECT * FROM table1 WHERE column1 = &#39;value&#39;.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Joining tables:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To combine data from two or more tables, use the JOIN keyword, like this: &lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;SELECT * FROM table1 JOIN table2 ON table1.column1 = table2.column2.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Grouping and aggregating data:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;To group data by one or more columns and perform aggregate functions such as SUM or COUNT, use the GROUP BY and HAVING keywords, like this: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; mso-ansi-language: EN-US; mso-highlight: yellow;&quot;&gt;SELECT column1, SUM(column2) FROM table1 GROUP BY column1 HAVING SUM(column2) &amp;gt; 100.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Sorting data:&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt; To sort the data by one or more columns, use the ORDER BY keyword, like this: &lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;SELECT * FROM table1 ORDER BY column1 DESC.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Best Practices&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;When writing SELECT statements, there are several best practices you should follow to ensure that your queries are efficient and maintainable:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Avoid using the * wildcard character, as it can lead to unnecessary data retrieval and slower performance. Instead, list the specific columns you need.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use table aliases to make your queries easier to read and write. For example, instead of SELECT column1 FROM table1, you could write SELECT t1.column1 FROM table1 AS t1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use indexes to optimize queries with large datasets.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Avoid using subqueries unless necessary, as they can be slower and harder to read and maintain.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;Ø&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Use the EXPLAIN PLAN feature to analyze query performance and optimize your queries as needed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;The SELECT statement is a fundamental component of SQL that is used to retrieve data from one or more tables in a SQL Server database. By following best practices and writing efficient queries, you can use SELECT statements to retrieve and manipulate data in powerful and useful ways.&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reference&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/t-sql/queries/select-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/8624452186152867310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/select-clause-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8624452186152867310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8624452186152867310'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/select-clause-sql.html' title='SELECT Clause - SQL'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-3701994439300583747</id><published>2023-03-13T10:11:00.005-07:00</published><updated>2023-03-14T22:55:02.484-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Views - SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Views&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;A view in SQL Server is a virtual table that is based on the result of a select statement. Views can simplify complex queries, hide the complexity of the underlying data model, and provide a security mechanism by limiting access to sensitive data. In addition, views can be used to provide a consistent view of data across multiple tables or to present a subset of data that is tailored to a specific application or user.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Creating a view in SQL Server is straightforward. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VIEW&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; CustomersWithOrders &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CompanyName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;COUNT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; OrderCount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Customers c&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Orders o &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; o&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CompanyName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a view called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CustomersWithOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; that contains three columns: &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CompanyName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;OrderCount&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;. The view is based on a select statement that joins the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;Orders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; tables and groups the results by customer ID and company name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;To modify a view in SQL Server, you can use the ALTER VIEW statement. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VIEW&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; CustomersWithOrders&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CompanyName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;COUNT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; OrderCount&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AVG&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TotalAmount&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; AvgAmount&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Customers c&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Orders o &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; o&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; c&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CompanyName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re modifying the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CustomersWithOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; view to include a new column that calculates the average order amount for each customer. The ALTER VIEW statement is used to update the definition of the view to include this new column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 0cm; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Note that when you modify a view, you need to ensure that the changes do not violate any existing constraints or dependencies. For example, if the view is used in other queries or in stored procedures, you may need to modify those objects as well to ensure that they continue to work correctly with the updated view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Indexed View&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;background: #F7F7F8; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;In SQL Server, an indexed view is a view that has been materialized and stored in the database as a physical index. Indexed views can improve query performance by pre-aggregating data and reducing the number of joins required to satisfy a query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;background: #F7F7F8; border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;To create an indexed view in SQL Server, follow these steps:&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; margin-left: 18.0pt; margin-right: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 5.0pt;&quot;&gt; &lt;ol start=&quot;1&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt; &lt;li class=&quot;MsoNormal&quot; style=&quot;background: #F7F7F8; border: none; color: #374151; line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-list: l2 level1 lfo1; mso-padding-alt: 0cm 0cm 0cm 5.0pt; padding: 0cm; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Create a view that contains the desired query      logic. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VIEW&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; SalesByProduct &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ProductID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderQty&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; TotalSales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; SalesOrderDetail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ProductID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; margin-left: 18.0pt; margin-right: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 5.0pt;&quot;&gt; &lt;ol start=&quot;2&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt; &lt;li class=&quot;MsoNormal&quot; style=&quot;background: #F7F7F8; border: none; color: #374151; line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-list: l0 level1 lfo2; mso-padding-alt: 0cm 0cm 0cm 5.0pt; padding: 0cm; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Add the WITH SCHEMABINDING option to the view      definition. This option ensures that the schema of the underlying tables      cannot be modified while the indexed view exists.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VIEW&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; SalesByProduct &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SCHEMABINDING&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ProductID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderQty&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; TotalSales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; SalesOrderDetail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 90.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; ProductID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 90.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; margin-left: 18.0pt; margin-right: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 5.0pt;&quot;&gt; &lt;ol start=&quot;3&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt; &lt;li class=&quot;MsoNormal&quot; style=&quot;background: #F7F7F8; border: none; color: #374151; line-height: normal; margin-bottom: 0cm; margin-left: 18.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-list: l1 level1 lfo3; mso-padding-alt: 0cm 0cm 0cm 5.0pt; padding: 0cm; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Create a clustered index on the view. This      index will be used to store the materialized data and support queries      against the view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;UNIQUE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;CLUSTERED&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;INDEX&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;IX_SalesByProduct &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt; SalesByProduct&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;ProductID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;);&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; text-indent: 36pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a clustered index on the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;SalesByProduct&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; view, using the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;ProductID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; column as the index key. The index is marked as unique, since each product should have only one total sales value.Note that creating an indexed view can have some performance implications, as it requires additional storage and maintenance overhead. However, for certain types of queries and data models, indexed views can be an effective way to improve query performance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Delete the view&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;T&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;o delete a view in SQL Server, you can use the DROP VIEW statement followed by the name of the view you want to delete. Here&#39;s an example:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;VIEW&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; CustomersWithOrders&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re deleting the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CustomersWithOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; view. Once the view is deleted, any dependent objects such as stored procedures or other views that use the view will also be affected and may need to be updated or deleted as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;It&#39;s important to note that once a view is deleted, it cannot be recovered. So be sure to double-check that you have selected the correct view before deleting it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Reference&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/views/views?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/views/views?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/3701994439300583747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/views-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3701994439300583747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3701994439300583747'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/views-sql-server.html' title='Views - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-1134577554790667859</id><published>2023-03-13T10:11:00.004-07:00</published><updated>2023-03-13T10:27:05.091-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Synonyms, Trigger &amp; Sequences - SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Synonyms&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In SQL Server, a synonym is an alternative name for a database object, such as a table, view, stored procedure, or function. Synonyms can be useful for simplifying complex object names, abstracting the underlying object structure, or providing a layer of indirection between objects and their callers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Creating a synonym in SQL Server is straightforward. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;SYNONYM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; MyTable &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;FOR&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;AdventureWorks2019&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;MyTable&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this example, we&#39;re creating a synonym called MyTable that points to a table called MyTable in the AdventureWorks2019 database. Now, instead of referring to the table as AdventureWorks2019.dbo.MyTable, we can simply use the synonym name MyTable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;To modify a synonym in SQL Server, you can use the ALTER SYNONYM statement. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SYNONYM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MyTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;RENAME &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TO&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MyNewTable&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;In this example, we&#39;re modifying the MyTable synonym to have a new name MyNewTable. This will update all references to the synonym to use the new name instead.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Note that when you create or modify a synonym, the underlying object must exist and be accessible to the user creating the synonym. Additionally, any permissions or security settings on the underlying object will apply to the synonym as well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Triggers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In SQL Server, a trigger is a special type of stored procedure that is automatically executed in response to certain events, such as the insertion, deletion, or modification of data in a table. Triggers can be used to enforce business rules, maintain referential integrity, or perform other custom logic based on changes to the data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;Creating a trigger in SQL Server is straightforward. Here&#39;s an example:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TRIGGER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MyTrigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MyTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AFTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- Trigger logic here&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this example, we&#39;re creating a trigger called MyTrigger that will be executed after insert, update, or delete operations on the MyTable table. The trigger logic goes inside the BEGIN...END block.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;To modify a trigger in SQL Server, you can use the ALTER TRIGGER statement. Here&#39;s an example:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TRIGGER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;MyTrigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MyTable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AFTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;-- Updated trigger logic here&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this example, we&#39;re modifying the MyTrigger trigger to update the trigger logic. The ALTER TRIGGER statement is similar to the CREATE TRIGGER statement, but with the updated trigger logic inside the BEGIN...END block.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;Note that triggers can have a significant impact on database performance and should be used judiciously. Additionally, triggers can sometimes be disabled or deleted by other users or processes, so be sure to test your trigger logic carefully to ensure that it behaves correctly in all scenarios.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Sequences&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In SQL Server, a sequence is a database object that generates a series of numeric values according to a defined set of rules. Sequences can be useful for generating unique identifiers, such as primary keys for tables, without requiring access to the underlying data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;Sequences can be defined with a starting value, an increment value, and a maximum or minimum value. When you request the next value from a sequence, SQL Server generates the next number in the sequence based on these parameters. Sequences can be accessed using the NEXT VALUE FOR function.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;Here&#39;s an example of creating a sequence in SQL Server:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SEQUENCE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MySequence&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;START&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;INCREMENT &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MINVALUE 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MAXVALUE 1000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CYCLE&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;In this example, we&#39;re creating a sequence called MySequence that starts with 1 and increments by 1 for each value, up to a maximum value of 1000. When the maximum value is reached, the sequence will cycle back to the starting value.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;You can use the NEXT VALUE FOR function to retrieve the next value from the sequence:&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;This will return the next value in the sequence, starting with 1 in this example.&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;NEXT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;VALUE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FOR&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; MySequence&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Sequences can be useful for generating unique values for primary keys, especially in situations where multiple clients may be inserting data concurrently. However, it&#39;s important to consider the potential impact on performance, as generating unique values using a sequence may be slower than using a default or generated identity column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/1134577554790667859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/synonyms-trigger-sequences-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/1134577554790667859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/1134577554790667859'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/synonyms-trigger-sequences-sql-server.html' title='Synonyms, Trigger &amp; Sequences - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-8541938574915590973</id><published>2023-03-13T10:10:00.005-07:00</published><updated>2023-03-14T22:56:56.902-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Primary Key, Foreign Key Column and Check Constraint - SQL Server</title><content type='html'>&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;What is Primary Key?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A primary key is a unique identifier for a record or row in a database table. It is a column or set of columns that uniquely identifies each record in a table and serves as a reference point for other tables that need to link to that table&#39;s records. Primary keys are used to enforce the integrity of the database by ensuring that each record can be uniquely identified, and they also help to optimize database performance by providing a fast way to retrieve data.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;To create a primary key in SQL Server, you can use the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;CREATE TABLE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; statement with the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;PRIMARY KEY&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; constraint. Here&#39;s an example:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; Customers&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustomerID &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstName &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;),&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;),&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Email &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin: 15pt 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;In this example, we&#39;re creating a table called &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; with four columns. The &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; column is declared as an &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; and is designated as the primary key using the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;PRIMARY KEY&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; constraint. The &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;FirstName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;, &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;LastName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;, and &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Email&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; columns are declared as &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;varchar&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; data types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; box-sizing: border-box; margin: 15pt 0cm; padding: 0cm; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Note that you can also create a primary key using the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;ALTER TABLE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; statement. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;span style=&quot;color: blue;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; Customers&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ADD&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CONSTRAINT&lt;/span&gt;PK_Customers &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;KEY &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;CustomerID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151;&quot;&gt;This statement adds a primary key constraint to an existing &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; table, using the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;ADD CONSTRAINT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; clause and the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;PRIMARY KEY&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; keyword. The &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; column is specified as the primary key column.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; text-indent: -18pt;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;text-indent: -18pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;What is Foreign Key?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin: 0cm 0cm 15pt; padding: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;A foreign key is a column or set of columns in a table that refers to the primary key of another table. It is used to establish a relationship between two tables in a relational database. The purpose of a foreign key is to ensure referential integrity, which means that the data in the related tables remains consistent and accurate.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; box-sizing: border-box; margin: 15pt 0cm; padding: 0cm; white-space: pre-wrap;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;When a table has a foreign key, it is creating a reference to another table&#39;s primary key. This creates a link between the two tables, allowing data to be shared and used in different ways. For example, if you have a table of orders and a table of customers, you could use a foreign key in the orders table to reference the customer ID in the customers table. This would allow you to see which customer placed each order, and to link customer information to the orders as needed.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;To add a foreign key in SQL Server, you can use the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;ALTER TABLE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; statement with the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;ADD CONSTRAINT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; clause. Here&#39;s an example:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;TABLE&lt;/span&gt; Orders&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ADD&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CONSTRAINT&lt;/span&gt;FK_Orders_Customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;FOREIGN&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;KEY &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;CustomerID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;REFERENCES&lt;/span&gt; Customers&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;CustomerID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin: 15pt 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;In this example, we&#39;re adding a foreign key constraint to the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Orders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; table, using the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;ADD CONSTRAINT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; clause and the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;FOREIGN KEY&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; keyword. The &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; column in the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Orders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; table is specified as the foreign key column, and the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; table is specified as the referenced table, with its &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; column as the referenced column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; box-sizing: border-box; margin: 15pt 0cm; padding: 0cm; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Note that you can also specify additional options for the foreign key constraint, such as &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;ON DELETE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; and &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;ON UPDATE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; actions. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ALTER&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;TABLE&lt;/span&gt; Orders&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ADD&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CONSTRAINT&lt;/span&gt;FK_Orders_Customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;FOREIGN&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;KEY &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;CustomerID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;REFERENCES&lt;/span&gt; Customers&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;CustomerID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ON&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CASCADE&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;ON&lt;/span&gt; &lt;span style=&quot;color: magenta; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CASCADE&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;In this example, we&#39;re adding &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;ON DELETE CASCADE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; and &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: Calibri, sans-serif; line-height: 107%; padding: 0cm;&quot;&gt;ON UPDATE CASCADE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; options to the foreign key constraint. This means that if a customer is deleted or updated, all related orders will also be deleted or updated automatically.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 18.0pt; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Wingdings; mso-ansi-language: EN-US; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Check Constraints&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; margin: 0cm 0cm 15pt; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;A check constraint in SQL Server is used to ensure that the data entered into a column or a set of columns meets a certain condition. It can be used to restrict the range of values that can be entered into a column or to validate data against a specific pattern or formula. Check constraints can be applied to a single column or to multiple columns within a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; box-sizing: border-box; margin: 15pt 0cm; padding: 0cm; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Here&#39;s an example of creating a check constraint:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;TABLE&lt;/span&gt;Employees&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeID &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;PRIMARY&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;KEY&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstName &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;),&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LastName &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;50&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;),&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Age &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CONSTRAINT&lt;/span&gt;CHK_Employees_Age &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;CHECK &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;Age &lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&amp;gt;=&lt;/span&gt;18 &lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;AND&lt;/span&gt; Age &lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&amp;lt;=&lt;/span&gt; 65&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;In this example, we&#39;re creating a table called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Employees&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt; with four columns: &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;EmployeeID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;, &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;FirstName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;, &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;LastName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;, and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Age&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;. We&#39;ve also added a check constraint to the table to ensure that the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: #f7f7f8; box-sizing: border-box; color: var(--tw-prose-code); font-size: 11pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Age&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt; column contains values between 18 and 65.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: none; box-sizing: border-box; margin: 15pt 0cm; padding: 0cm; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Once the check constraint is in place, any attempt to insert or update data in the &lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; font-family: &amp;quot;Calibri&amp;quot;,sans-serif; mso-ansi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-bidi-font-size: 11.0pt; mso-bidi-theme-font: minor-latin; mso-border-alt: solid #D9D9E3 .25pt; mso-hansi-theme-font: minor-latin; padding: 0cm;&quot;&gt;Age&lt;/span&gt;&lt;/b&gt;&lt;/code&gt; column that falls outside the specified range will be rejected with an error message. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;INSERT&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;INTO&lt;/span&gt;Employees&lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;EmployeeID&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;FirstName&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt; LastName&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;Age&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: blue; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;VALUES &lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&#39;John&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: red; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&#39;Doe&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;,&lt;/span&gt;16&lt;span style=&quot;color: grey; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;);&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;This statement will fail with the following error message:&lt;/p&gt;&lt;div style=&quot;border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;border: none; line-height: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: yellow; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow;&quot;&gt;The INSERT statement conflicted with the CHECK constraint &quot;CHK_Employees_Age&quot;. The conflict occurred in database &quot;MyDatabase&quot;, table &quot;dbo.Employees&quot;, column &#39;Age&#39;.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Calibri, sans-serif; font-size: 11pt;&quot;&gt;Note that you can also use check constraints to validate data against other columns within the same table or to perform more complex validations using user-defined functions.&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/8541938574915590973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/primary-key-foreign-key-column-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8541938574915590973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/8541938574915590973'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/primary-key-foreign-key-column-and.html' title='Primary Key, Foreign Key Column and Check Constraint - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-244739234438751421</id><published>2023-03-13T10:10:00.004-07:00</published><updated>2023-03-14T22:56:17.060-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Stored Procedures - SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Stored Procedures&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: black; mso-ansi-language: EN-US; mso-color-alt: windowtext;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Stored procedures are precompiled SQL statements that are stored in a database and can be called and executed by users or applications. They can be used to perform complex database operations, retrieve data, or modify data in a database. Stored procedures can improve performance and security by reducing network traffic and preventing SQL injection attacks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;To create a stored procedure in SQL Server, you can use the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CREATE PROCEDURE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; statement. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PROCEDURE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; GetCustomers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a stored procedure called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;GetCustomers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; that retrieves all the records from the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; table. The &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;AS&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; keyword is used to separate the procedure definition from the procedure body. The &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;BEGIN&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;END&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; keywords define the procedure body, which contains the SQL code that will be executed when the stored procedure is called.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;To execute the stored procedure, you can use the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;EXECUTE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; statement, like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;EXECUTE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; GetCustomers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;This statement will execute the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;GetCustomers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; stored procedure and return all the records from the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;Customers&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Note that stored procedures can also accept parameters and return values. You can define input parameters using the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@parameter_name data_type&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; syntax, and you can define output parameters using the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@parameter_name data_type OUTPUT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; syntax. Here&#39;s an example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;PROCEDURE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; GetCustomerByID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@CustomerID &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@FirstName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@LastName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @FirstName &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; FirstName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @LastName &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; LastName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Customers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; CustomerID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @CustomerID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a stored procedure called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;GetCustomerByID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; that accepts an input parameter &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;@CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; and two output parameters &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;@FirstName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; and &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;@LastName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;. The procedure retrieves the first and last name of the customer with the specified ID and assigns them to the output parameters. To execute this stored procedure, you can use the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;EXECUTE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; statement with parameters, like this:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @FirstName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @LastName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;EXECUTE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; GetCustomerByID&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @FirstName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @LastName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OUTPUT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @FirstName&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @LastName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;This statement will execute the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;GetCustomerByID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; stored procedure with a parameter value of 1 and will assign the first and last name of the customer to the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;@FirstName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; and &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;@LastName&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; variables, which are then selected and displayed in the result set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Note that you can also modify existing stored procedures using the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;ALTER PROCEDURE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; statement, or delete them using the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;DROP PROCEDURE&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; statement. You can also view a list of stored procedures in a database using the &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; box-sizing: border-box; color: var(--tw-prose-code); font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; color: black; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; mso-border-alt: solid #D9D9E3 .25pt; mso-color-alt: windowtext; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; padding: 0cm;&quot;&gt;sp_help&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt; system stored procedure.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Reference :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/stored-procedures/create-a-stored-procedure?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/stored-procedures/create-a-stored-procedure?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/244739234438751421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/stored-procedures-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/244739234438751421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/244739234438751421'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/stored-procedures-sql-server.html' title='Stored Procedures - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-6279178754572596656</id><published>2023-03-13T10:10:00.003-07:00</published><updated>2023-03-14T22:55:40.908-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Functions - SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Functions&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;In SQL Server, a function is a pre-written piece of code that performs a specific task and returns a value. Functions can be used to encapsulate complex calculations, to improve performance by reducing network traffic, and to enforce security by restricting direct access to database tables.&lt;/span&gt;&lt;/p&gt;&lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;There are two types of functions in SQL Server:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; margin-left: 18.0pt; margin-right: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 5.0pt;&quot;&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: #F7F7F8; border: none; box-sizing: border-box; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-list: l0 level1 lfo1; mso-padding-alt: 0cm 0cm 0cm 5.0pt; padding: 0cm; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Scalar Functions: These functions return a single value based on input parameters. Examples include &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;LEN&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, which returns the length of a string, and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;SUM&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, which returns the sum of a set of values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background: #F7F7F8; border: none; box-sizing: border-box; margin-bottom: 0cm; margin-left: 18.0pt; margin-right: 0cm; margin-top: 0cm; mso-border-alt: solid #D9D9E3 .25pt; mso-list: l0 level1 lfo1; mso-padding-alt: 0cm 0cm 0cm 5.0pt; padding: 0cm; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Table-Valued Functions: These functions return a table or a set of rows based on input parameters. Examples include &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;fnSplit&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, which splits a string into rows based on a delimiter, and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;fnGetSalesByMonth&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, which returns sales data grouped by month.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;To create a function in SQL Server, you can use the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;CREATE FUNCTION&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; statement. Here&#39;s an example of creating a scalar function:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FUNCTION&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; GetTotalOrders&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@CustomerID &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;RETURNS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @TotalOrders &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @TotalOrders &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;COUNT&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(*)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Orders &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CustomerID &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @CustomerID&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;RETURN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @TotalOrders&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a scalar function called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;GetTotalOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; that takes an input parameter called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@CustomerID&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; and returns an integer value. The function uses a &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;SELECT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; statement to count the number of orders for the specified customer ID and stores the result in a variable called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@TotalOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;. Finally, the function returns the value of &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@TotalOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Here&#39;s an example of creating a table-valued function:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FUNCTION&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; fnGetSalesByMonth&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@Year &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;RETURNS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;RETURN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;MONTH&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderDate&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Month&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TotalAmount&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; TotalSales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; Orders&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;YEAR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderDate&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; @Year&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;MONTH&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;OrderDate&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div style=&quot;background: #F7F7F8; border: solid #D9D9E3 1.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-element: para-border-div; padding: 0cm 0cm 0cm 0cm;&quot;&gt; &lt;p style=&quot;background: #F7F7F8; border: none; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; padding: 0cm;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In this example, we&#39;re creating a table-valued function called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;fnGetSalesByMonth&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; that takes an input parameter called &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;@Year&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; and returns a table with two columns: &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;Month&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; and &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;TotalSales&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;. The function uses a &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code);&quot;&gt;&lt;b&gt;&lt;span style=&quot;border: solid #D9D9E3 1.0pt; color: #374151; font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; mso-border-alt: solid #D9D9E3 .25pt; padding: 0cm;&quot;&gt;SELECT&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; statement to retrieve sales data for the specified year, grouping the data by month and calculating the total sales for each month.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; -webkit-text-stroke-width: 0px; background: #F7F7F8; border: none; box-sizing: border-box; font-variant-caps: normal; font-variant-ligatures: normal; margin-bottom: 15.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 15.0pt; mso-border-alt: solid #D9D9E3 .25pt; mso-padding-alt: 0cm 0cm 0cm 0cm; orphans: 2; padding: 0cm; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Once you&#39;ve created the function, you can call it like any other function. For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;/div&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; dbo&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;GetTotalOrders&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;12345&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;In this example, we&#39;re calling the &lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; padding: 0cm;&quot;&gt;GetTotalOrders&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; function with an input parameter of &lt;/span&gt;&lt;/span&gt;&lt;code style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(59,130,246,0.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; box-sizing: border-box; color: var(--tw-prose-code); white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: rgb(247, 247, 248); border: 1pt solid rgb(217, 217, 227); font-family: &amp;quot;Ubuntu Mono&amp;quot;; font-size: 10.5pt; line-height: 107%; padding: 0cm;&quot;&gt;12345&lt;/span&gt;&lt;/b&gt;&lt;/code&gt;&lt;span style=&quot;background: rgb(247, 247, 248); color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;. The function will return the total number of orders for the&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; white-space: pre-wrap; widows: 2; word-spacing: 0px;&quot;&gt;specified customer ID.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Reference :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background: #F7F7F8; color: #374151; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/6279178754572596656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/functions-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/6279178754572596656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/6279178754572596656'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/functions-sql-server.html' title='Functions - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-7845489836324911017</id><published>2023-03-12T22:37:00.001-07:00</published><updated>2023-03-14T22:57:23.481-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Identity Column - SQL Server</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Identity column in SQL server&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;IDENTITY&lt;/span&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;property used to c&lt;span style=&quot;background: white;&quot;&gt;reate an identity column in a table. It will be used with the CREATE TABLE and ALTER TABLE Transact-SQL statements.&lt;/span&gt; This column should be integer based column which will be handled by SQL server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;hljs-keyword&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas;&quot;&gt;IDENTITY&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas;&quot;&gt;&lt;span style=&quot;-webkit-text-stroke-width: 0px; float: none; font-variant-caps: normal; font-variant-ligatures: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;&quot;&gt; [ (seed , increment) ]&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style=&quot;background: white; margin-left: 36.0pt;&quot;&gt;&lt;em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;seed&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;Is the value that is used for the very first row loaded into the table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;-webkit-text-stroke-width: 0px; background: white; box-sizing: inherit; font-variant-caps: normal; font-variant-ligatures: normal; margin-left: 36.0pt; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;&quot;&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;increment&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;Is the incremental value that is added to the identity value of the previous row that was loaded.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;You must specify both the seed and increment or neither. If neither is specified, the default is (1,1).&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Example &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; Student &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;(&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;RollNumber &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;IDENTITY&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;(1,1),&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;name &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;varchar&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; (50),&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;..&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas;&quot;&gt;);&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;You must specify both the seed and increment or neither. If neither is specified, the default is (1,1).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt; line-height: 107%;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p style=&quot;-webkit-text-stroke-width: 0px; background: white; box-sizing: inherit; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Identity columns can be used for generating key values. The identity property on a column guarantees the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l1 level1 lfo1; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Each new value is generated based on the current seed &amp;amp; increment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l1 level1 lfo1; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Each new value for a particular transaction is different from other concurrent transactions on the table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;-webkit-text-stroke-width: 0px; background: white; box-sizing: inherit; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;The identity property on a column does not guarantee the following:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;-webkit-text-stroke-width: 0px; background: white; box-sizing: inherit; font-variant-caps: normal; font-variant-ligatures: normal; margin: 1rem 0px 0px; orphans: 2; outline-color: inherit; overflow-wrap: break-word; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10pt; text-indent: -18pt;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Uniqueness of the value&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; text-indent: -18pt;&quot;&gt;&amp;nbsp;- Uniqueness must be enforced by using a&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;PRIMARY KEY&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;UNIQUE&lt;/strong&gt;&amp;nbsp;constraint or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;UNIQUE&lt;/strong&gt;&amp;nbsp;index.&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10pt; text-indent: -18pt;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-feature-settings: normal; font-kerning: auto; font-optical-sizing: auto; font-size: 7pt; font-stretch: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-variation-settings: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;text-indent: -18pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Consecutive values within a transaction&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 11pt; text-indent: -18pt;&quot;&gt;&amp;nbsp;- A transaction inserting multiple rows is not guaranteed to get consecutive values for the rows because other concurrent inserts might occur on the table. If values must be consecutive then the transaction should use an exclusive lock on the table or use the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;SERIALIZABLE&lt;/strong&gt;&amp;nbsp;isolation level.&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l0 level1 lfo3; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Consecutive values after server restart or other failures&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;&amp;nbsp;- SQL Server might cache identity values for performance reasons and some of the assigned values can be lost during a database failure or server restart. This can result in gaps in the identity value upon insert. If gaps are not acceptable then the application should use its own mechanism to generate key values. Using a sequence generator with the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;NOCACHE&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;option can limit the gaps to transactions that are never committed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l0 level1 lfo3; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Reuse of values&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;&amp;nbsp;- For a given identity property with specific seed/increment, the identity values are not reused by the engine. If a particular insert statement fails or if the insert statement is rolled back then the consumed identity values are lost and will not be generated again. This can result in gaps when the subsequent identity values are generated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Reference : &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property?view=sql-server-ver16&quot;&gt;https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property?view=sql-server-ver16&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/7845489836324911017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/identity-column-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7845489836324911017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7845489836324911017'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/identity-column-sql-server.html' title='Identity Column - SQL Server'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-5487138720433385516</id><published>2023-03-12T01:00:00.002-08:00</published><updated>2023-03-14T22:57:47.910-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server Table Contd- Columns </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Add the new column in SQL server table&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once we have created the tables, all applications will used to store the details in the tables so we cant use the create table along with data. We can add the column in two ways in SSMS SQL server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS Object Explorer Design Option&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the ALTER keyword we can add the new column in SQL serve Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;Syntax&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; TableName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;ADD&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; Column1 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;Datatype1&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;Colun2 &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;Datatype2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; dbo&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;Student&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;ADD&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; EMailID &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;50&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;NULL,&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;FatherName &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;80&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Please refer the below link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/add-columns-to-a-table-database-engine?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/add-columns-to-a-table-database-engine?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Delete column in a SQL server table &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once we have created the tables, we might need to delete the column which is not required any more. We can use the following ways to delete the table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS Object Explorer Design Option&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the ALTER and DROP keyword we can add the new column in SQL serve Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;Syntax&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; TableName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;DROP COLUMN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; Column1&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; dbo&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;Student&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;DROP COLUMN&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; EMailID&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Please refer the below link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/delete-columns-from-a-table?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/delete-columns-from-a-table?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Rename the column in a SQL server table&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once we have created the tables, we might need to change the column name which will help to give meaningful. We can use the following ways to rename the table column name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS Object Explorer Design and Table Design Option&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the pre-defined Stored procedure available in SQL server &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;Syntax&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;sp_rename&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;Fully Qualified Column Name&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;new column name&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;COLUMN&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;sp_rename&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;dbo.Student.FatherName&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;FatherFullName&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&#39;COLUMN&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;While running the query system will throw the caution message. Please make sure we haven’t used this name any dependent objects of SQL server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Please refer the below link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/rename-columns-database-engine?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/rename-columns-database-engine?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Modify the column in a SQL server table&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Modifying column will help us to change the column data type or increase the length of the data type which is required if the application usage increased or if we wrongly specified the column details. We can use the following ways to rename the table column name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l3 level1 lfo4; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS Object Explorer Table Design Option&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l3 level1 lfo4; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the ALTER keyword we can modify the table column. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;Syntax&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TableName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;COLUMN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; ColunName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;150&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;NOT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt; dbo&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;Student&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72.0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;COLUMN&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; FatherFullName &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;150&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;NOT&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Here I am changing the column length and adding NOT NULL condition using alter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Please refer the below link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/modify-columns-database-engine?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/modify-columns-database-engine?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Setting Default Value to the column&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Instead of insert the NULL value in column value we can insert the default value for the column. We can use default parameter while you want to insert the system date in the table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the Default keyword we can add the default value in SQL server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;Example while create&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; dbo.doc_exz (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;column_a &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72.0pt;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;column_b &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;DEFAULT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; 50);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;While Alter Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;ALTER&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; dbo.doc_exz&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;ADD&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;CONSTRAINT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; DF_Doc_Exz_Column_B&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 144.0pt;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;DEFAULT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; 50 &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;FOR&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; column_b;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Generally Default value is a one of the SQL server constraint. So we can give the specific name for the same. Please refer the below&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; dbo.doc_exz (&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;column_a &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;column_b &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;CONSTRAINT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; DF_Doc_Exz_Column_B &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;DEFAULT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; 50);&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;Please refer the below link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/specify-default-values-for-columns?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/specify-default-values-for-columns?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/5487138720433385516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-table-contd-columns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5487138720433385516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/5487138720433385516'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-table-contd-columns.html' title='SQL Server Table Contd- Columns '/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-3995733153002133857</id><published>2023-03-11T00:57:00.004-08:00</published><updated>2023-03-11T00:58:41.612-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server - Tables </title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;What is Table?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Tables are&amp;nbsp;database objects that contain all the data in a database. In tables, data is logically organized in a row-and-column format similar to a spreadsheet. Each row represents a unique record, and each column represents a field in the record.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;There are different types of table available in SQL Server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Partitioned Tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Temporal tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Wide Tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;System Tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please refer the below link to more about the Tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/tables?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/tables?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Create a table in SQL Server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;There are multiple ways to create a table in SQL server. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 90.0pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using Table designer SQL server Management Studio(SSMS)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 90.0pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using T SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;In this blog we are going to see about, creating table using the Transaction SQL.&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Please find the generic basic syntax on create table using the SQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;CREATE TABLE Table_Name(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Column_Name1 DataType1,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Colun_Name2 DataType2,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Column_Name3 DataType3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;CREATE and TABLE are the keywords used to create the table with proceeding with table name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;After the table name we need to mention the column names to be stored in the table name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We will create the sample table for storing the student details. &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; Student&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;StudentRollNo &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;StudentName &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;70&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;Gender &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;CHAR&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;),&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;StudentDOB &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;DATE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 108.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: grey; font-family: Consolas; font-size: 8.0pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 8.0pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Delete the table in SQL Server&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the same way to delete the table in SQL server. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the SSMS Object Explorer -&amp;gt; Right Click the Table and click the drop.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can Use T SQL DROP command to delete the table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Syntax &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; TableName&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the below code to delete the table using the above command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; line-height: 107%; mso-bidi-font-family: Consolas; mso-highlight: yellow;&quot;&gt; Student&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Notes : &lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;There are set of Limitations and restrictions apply while delete the table in SQL server. Please refer the below link on the same.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/delete-tables-database-engine?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/delete-tables-database-engine?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Rename the Table in SQL Server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the same two way to rename the table in SQL server. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the SSMS Object Explorer -&amp;gt; Right Click the Table and click the rename.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use pre defined Stored Procedure to rename the table name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36.0pt;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Syntax &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; line-height: 107%; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;EXEC sp_rename ‘Table Name to be renamed along with Schema Name’, &#39;New table name&#39;;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8.0pt; line-height: 107%; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the below code to rename the table using the below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt;sp_rename&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;dbo.Student&#39;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: Consolas;&quot;&gt;&#39;StudentDetils&#39;&lt;/span&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 8.0pt; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Notes : &lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please refer the below link for more info&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/rename-tables-database-engine?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/rename-tables-database-engine?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;View the existing Table Definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We will often encounter the problem to view the table definition details while look into the existing SQL server DB. For that we can use the below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l3 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the existing procedure sp_help to know about the table definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36.0pt; text-indent: 36.0pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; mso-ansi-language: EN-US; mso-highlight: yellow;&quot;&gt;Ex : &lt;/span&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;EXEC sp_help &#39;dbo.student;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l3 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the system tables we can view the table definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; s.name &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; schema_name, t.name &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; table_name, c.* &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;sys.columns &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; c &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INNER&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; sys.tables &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; t &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; t.object_id = c.object_id &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;INNER&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; sys.schemas &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; s &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; s.schema_id = t.schema_id &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;t.name = &lt;/span&gt;&lt;span style=&quot;background: yellow; color: #a31515; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;&#39;mytable&#39;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #0101fd; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;AND&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; s.name = &lt;/span&gt;&lt;span style=&quot;background: yellow; color: #a31515; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;&#39;dbo&#39;&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l3 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS object explorer design option &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Refer the below link to know more about this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/view-the-table-definition?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/view-the-table-definition?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;View the dependencies of the Table in SQL server&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We will often encounter the problem to view the table dependency details while look into the existing SQL server DB for modification. For that we can use the below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;We can use the existing view to search about dependency of all SQL Server Objects&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;USE AdventureWorks2012;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;GO&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;SELECT * FROM sys.sql_expression_dependencies&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;WHERE referencing_id = OBJECT_ID(&lt;/span&gt;&lt;span style=&quot;background: yellow; color: #4472c4; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2; mso-themecolor: accent1;&quot;&gt;N&#39;Production.vProductAndDescription&#39;&lt;/span&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;);&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 72.0pt;&quot;&gt;&lt;span style=&quot;background: yellow; color: #161616; font-family: Consolas; font-size: 8.0pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN; mso-highlight: yellow; mso-shading: #F2F2F2;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;background: #F2F2F2; color: #161616; font-family: Consolas; font-size: 10.5pt; line-height: 107%; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 54.0pt; mso-add-space: auto; mso-list: l1 level1 lfo4; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Using the SSMS object explorer design option right click the table and click on view dependencies to vie the details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Refer the below link to know more about this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/tables/view-the-dependencies-of-a-table?view=sql-server-ver16&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;https://learn.microsoft.com/en-us/sql/relational-databases/tables/view-the-dependencies-of-a-table?view=sql-server-ver16&lt;/span&gt;&lt;/a&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/3995733153002133857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3995733153002133857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/3995733153002133857'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-tables.html' title='SQL Server - Tables '/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-7454130008765598028</id><published>2023-03-10T09:36:00.001-08:00</published><updated>2023-03-10T09:45:29.467-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SSIS"/><title type='text'>SFTP Integration in SSIS package Using WinSCP DLL</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;In this blog, I am planning to write about SSIS SFTP Task details and reference sites, upload and download the files from SFTP server using SSIS package with help of the winscp library.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Steps to configure the winscp DLL and Download Files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please download the DLL and required files from below path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 36pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;a href=&quot;https://winscp.net/eng/downloads.php%23additional&quot;&gt;https://winscp.net/eng/downloads.php#additional&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once Downloaded, use the below comments to add in Local GAC &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;background: yellow; mso-ansi-language: EN-US; mso-highlight: yellow;&quot;&gt;&quot;Path to the gacutil exe \gacutil.exe&quot; /i WinSCPnet.dll&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please use the below URL as guide to implement the SSIS script task to download the files from SFTP using winscp as library&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 36pt;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;a href=&quot;https://winscp.net/eng/docs/library_ssis&quot;&gt;https://winscp.net/eng/docs/library_ssis&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;I am just briefing the steps based on the above URL what we can try in SSIS package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;5.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please create the below variables in SSIS package which we need to pass into the Script Task as a variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Host Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;SFTP Username&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;SFTP Password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;SFTP Source Path – From where we need to download the files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Destination Path – To which location we need to transfer the file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72pt; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Symbol; mso-ansi-language: EN-US; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Winscp Executable Path – Download winscp execution path&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;6.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please add script Task and click edit.&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ_1j-GHn4ZXQbFungCW0nkziO1fEpJ2CKHgXdYaeXwuwgDpGt6JM4a-m4mRLDwRg0KNe672274Wj3PKqwFxSgT_E4zQ7Z_yjVOwEo6s4Zyi53RZ0ywK7JSucZJ8rbFpckmI_WnSMyGsn7jeJG8_ymicrynA_Nk2IQAWIuGhVFDl2qHLlyOMJZ2qxZ_Q/s646/Adding%20Variable.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;513&quot; data-original-width=&quot;646&quot; height=&quot;376&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ_1j-GHn4ZXQbFungCW0nkziO1fEpJ2CKHgXdYaeXwuwgDpGt6JM4a-m4mRLDwRg0KNe672274Wj3PKqwFxSgT_E4zQ7Z_yjVOwEo6s4Zyi53RZ0ywK7JSucZJ8rbFpckmI_WnSMyGsn7jeJG8_ymicrynA_Nk2IQAWIuGhVFDl2qHLlyOMJZ2qxZ_Q/w474-h376/Adding%20Variable.png&quot; width=&quot;474&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;7.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once Added the variables in Read Write Variables. Please click Edit to edit Script the C# code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;8.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please add the reference for the DLL by right clicking the reference section solution explorer.&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmm1A4DrUs_NpOKST_CKhkjzohDlF_v9GWAIlLPey8vjtPR8fo_SlTfTbW5AusY-J7B9RW9Aids8CIbqkEwURXoS8D4I16wHBAqv0Xcaya7AJc4b-hR6o50WGINdtGrGIjw7RuF5ALoWl5OXt-W4J5Qp4Z5f3JMNvwRp2lh3W2YlYjI8gtljkAkJzbvQ/s759/Adding%20Reference.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;352&quot; data-original-width=&quot;759&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmm1A4DrUs_NpOKST_CKhkjzohDlF_v9GWAIlLPey8vjtPR8fo_SlTfTbW5AusY-J7B9RW9Aids8CIbqkEwURXoS8D4I16wHBAqv0Xcaya7AJc4b-hR6o50WGINdtGrGIjw7RuF5ALoWl5OXt-W4J5Qp4Z5f3JMNvwRp2lh3W2YlYjI8gtljkAkJzbvQ/w614-h255/Adding%20Reference.png&quot; width=&quot;614&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpFirst&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please browse the DLL path download in step one and add it in reference.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;9.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Once added we have ready to add the code for move the files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; Main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// Setup session options&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; HostName = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::HostName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; UserName = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::UserName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; Password = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::Password&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; SSHPath = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::SSHPath&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; (SSHPath == &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SSHPath = String.Empty;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;//User::DestinationPath,User::HostName,User::Password,User::SourcePath,User::SSHPath,User::UserName&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MessageBox.Show(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;Please FinD the Host Name&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;+HostName+&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;_&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;+ UserName+&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;_&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;+Password+&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;_&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;+SSHPath);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SessionOptions sessionOptions = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; SessionOptions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Protocol = Protocol.Sftp,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// To setup these variables, go to SSIS &amp;gt; Variables.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// To make them accessible from the script task, in the context menu of the&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// task, choose Edit. On the Script task editor on Script page,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// select ReadOnlyVariables, and tick the below properties.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;HostName = HostName,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;UserName = UserName,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Password = Password&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;sessionOptions.SshHostKeyPolicy = SshHostKeyPolicy.GiveUpSecurityAndAcceptAny;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; (Session session = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; Session())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// If WinSCP .NET assembly has been stored in GAC to be used with SSIS,&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// you need to set path to WinSCP.exe explicitly.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// This is not needed if you have subscribed AppDomain.AssemblyResolve event&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// and the WinSCP.exe is in the same location as WinSCPnet.dll.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; ExecutablePath= (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::WinscpExecutablesPath&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;session.ExecutablePath = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::WinscpExecutablesPath&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; destinationFilePath= (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::DestinationPath&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; sourceFilePath= (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)Dts.Variables[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;User::SourcePath&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;].Value;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;MessageBox.Show(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;Please FinD the Host Name 3&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; + ExecutablePath+&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;_&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;+destinationFilePath+sourceFilePath);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// Connect&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;session.Open(sessionOptions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// Upload files&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;TransferOptions transferOptions = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;TransferOptions();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;transferOptions.TransferMode = TransferMode.Binary;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;/* TransferOperationResult transferResult = session.PutFiles(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;destinationFilePath, sourceFilePath, false, transferOptions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;*/&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;TransferOperationResult transferResult = session.GetFiles(sourceFilePath, destinationFilePath, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;, transferOptions);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// Throw on any error&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;transferResult.Check();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;// Print results&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;bool&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; fireAgain = &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; (TransferEventArgs transfer &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; transferResult.Transfers)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dts.Events.FireInformation(0, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;.Format(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;Upload of {0} succeeded&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;, transfer.FileName),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;, 0, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; fireAgain);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dts.TaskResult = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)DTSExecResult.Success;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;catch&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt; (Exception e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dts.Events.FireError(0, &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;.Format(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&quot;Error when using WinSCP to upload files: {0}&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;, e),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;, 0);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Dts.TaskResult = (&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;)DTSExecResult.Failure;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 8pt; line-height: 107%; mso-bidi-font-family: Consolas;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;font-size: 8pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo1; text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;10.&lt;span style=&quot;font: 7pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;mso-ansi-language: EN-US;&quot;&gt;Please use the above code in Visual studio editor and save the details. Please run and check.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/7454130008765598028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sftp-integration-in-ssis-package-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7454130008765598028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7454130008765598028'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sftp-integration-in-ssis-package-using.html' title='SFTP Integration in SSIS package Using WinSCP DLL'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ_1j-GHn4ZXQbFungCW0nkziO1fEpJ2CKHgXdYaeXwuwgDpGt6JM4a-m4mRLDwRg0KNe672274Wj3PKqwFxSgT_E4zQ7Z_yjVOwEo6s4Zyi53RZ0ywK7JSucZJ8rbFpckmI_WnSMyGsn7jeJG8_ymicrynA_Nk2IQAWIuGhVFDl2qHLlyOMJZ2qxZ_Q/s72-w474-h376-c/Adding%20Variable.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-4410103681445348054</id><published>2023-03-09T10:21:00.000-08:00</published><updated>2023-03-09T10:21:18.065-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server - Data Types </title><content type='html'>&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Data Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;In this post I have collected the information from micro soft site and keep all the same in a single page.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;Please find the details&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp; Data types are the heart of the SQL language, as developer or designer we need to see the every data as data type, how we can store the data in the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In SQL Server, each column, local variable, expression, and parameter has a related data type. A data type is an attribute that specifies the type of data that the object can hold: integer data, character data, monetary data, date and time data, binary strings, and so on.&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;In SQL Server, based on the characteristic data types grouped as below categories&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table align=&quot;left&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin-left: 6.75pt; margin-right: 6.75pt; mso-padding-bottom-alt: 0cm; mso-padding-left-alt: 5.4pt; mso-padding-right-alt: 5.4pt; mso-table-anchor-horizontal: page; mso-table-anchor-vertical: paragraph; mso-table-left: 113.5pt; mso-table-lspace: 9.0pt; mso-table-rspace: 9.0pt; mso-table-top: -2.45pt; mso-yfti-tbllook: 1184; width: 340px;&quot;&gt; &lt;tbody&gt;&lt;tr style=&quot;height: 22.35pt; mso-row-margin-right: 11.1pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border: solid windowtext 1.0pt; height: 22.35pt; mso-border-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Exact Numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-left: none; border: solid windowtext 1.0pt; height: 22.35pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Unicode character strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border: none; mso-cell-special: placeholder; padding: 0cm 0cm 0cm 0cm;&quot; width=&quot;15&quot;&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&lt;/p&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;45&quot; style=&quot;border: none; height: 22.35pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 1;&quot;&gt;  &lt;td nowrap=&quot;&quot; style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; valign=&quot;bottom&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 2;&quot;&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Approximate Numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Binary strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 3;&quot;&gt;  &lt;td nowrap=&quot;&quot; style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; valign=&quot;bottom&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 4;&quot;&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Date and time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Other data types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 5;&quot;&gt;  &lt;td nowrap=&quot;&quot; style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; valign=&quot;bottom&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 6;&quot;&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Character strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td nowrap=&quot;&quot; rowspan=&quot;2&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 14.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 122.0pt;&quot; valign=&quot;bottom&quot; width=&quot;163&quot;&gt;  &lt;p align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm; mso-element-anchor-horizontal: page; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: 113.55pt; mso-element-top: -2.45pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt; &lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 7; mso-yfti-lastrow: yes;&quot;&gt;  &lt;td nowrap=&quot;&quot; style=&quot;height: 14.5pt; padding: .75pt 5.4pt 0cm 5.4pt; width: 11.1pt;&quot; valign=&quot;bottom&quot; width=&quot;15&quot;&gt;&lt;/td&gt;  &lt;!--[if !supportMisalignedRows]--&gt;  &lt;td height=&quot;29&quot; style=&quot;border: none; height: 14.5pt;&quot; width=&quot;0&quot;&gt;&lt;/td&gt;  &lt;!--[endif]--&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Exact Numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background: white; line-height: normal; margin-bottom: 13.5pt; margin-left: 72.0pt; margin-right: 0cm; margin-top: 22.5pt; mso-add-space: auto; mso-list: l1 level1 lfo3; mso-outline-level: 3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;bigint&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;numeric&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;bit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;d.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;smallint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;e.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;decimal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;f.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;smallmoney&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;g.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;h.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;tinyint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background: white; line-height: normal; margin-bottom: 13.5pt; margin-left: 72.0pt; margin-right: 0cm; margin-top: 22.5pt; mso-add-space: auto; mso-list: l1 level1 lfo3; mso-outline-level: 3; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 13.5pt; mso-color-alt: windowtext; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;i.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;money&lt;/span&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 13.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Approximate numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l11 level1 lfo15; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;float&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l11 level1 lfo15; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;real&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Date and Time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;datetimeoffset&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;datetime2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;d.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;smalldatetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;e.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l13 level1 lfo5; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;f.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Character Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l5 level1 lfo6; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;char&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l5 level1 lfo6; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;varchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l5 level1 lfo6; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Unicode Character Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l12 level1 lfo7; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;nchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l12 level1 lfo7; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;nvarchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l12 level1 lfo7; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;ntext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Binary Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l10 level1 lfo8; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;binary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l10 level1 lfo8; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;varbinary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l10 level1 lfo8; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;image&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 13.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 22.5pt; mso-outline-level: 3;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Other Data Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;a.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;cursor&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;b.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;rowversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;c.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;hierarchyid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;d.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;uniqueidentifier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;e.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;sql_variant&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;f.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;g.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Spatial Geometry Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;h.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;Spatial Geography Types&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l6 level1 lfo9; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;i.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;int, bigint, smallint, and tinyint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 13.5pt; margin-left: 0cm; margin-right: 0cm; margin-top: 22.5pt; mso-outline-level: 3;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Exact-number data types that use integer data. To save space in the database, use the smallest data type that can reliably contain all possible values. For example, tinyint would be sufficient for a person&#39;s age because no one lives to be more than 255 years old. But tinyint would not be sufficient for a building&#39;s age because a building can be more than 255 years old.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: white; border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; width: 592px;&quot;&gt; &lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Data type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Range expression&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Storage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;bigint&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-9,223,372,036,854,775,808   to 9,223,372,036,854,775,807&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-2^63 to 2^63-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;8 Bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;int&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-2,147,483,648 to   2,147,483,647&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-2^31 to 2^31-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;4 Bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;smallint&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-32,768 to 32,767&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;-2^15 to 2^15-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;2 Bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;tinyint&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;0 to 255&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;2^0-1 to 2^8-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;1 Byte&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data type is the primary integer data type in SQL Server. The&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;bigint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data type is intended for use when integer values might exceed the range that is supported by the&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;bigint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;fits between&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;smallmoney&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;in the data type precedence chart.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Functions return&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;bigint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;only if the parameter expression is a&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;bigint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data type. SQL Server does not automatically promote other integer data types (&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;tinyint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;smallint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;) to&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;bigint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;decimal and numeric&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Numeric data types that have fixed precision and scale. Decimal and numeric are synonyms and can be used interchangeably.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;arguments&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;[&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;p&lt;/em&gt;[&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;,&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;s&lt;/em&gt;]&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;)&lt;/strong&gt;] and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;numeric&lt;/strong&gt;[&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;p&lt;/em&gt;[&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;,&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;s&lt;/em&gt;]&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;)&lt;/strong&gt;]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;Fixed precision and scale numbers. When maximum precision is used, valid values are from - 10^38 +1 through 10^38 - 1. The ISO synonyms for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;decimal&lt;/strong&gt;&amp;nbsp;are&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;dec&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;dec(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;p&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;s&lt;/em&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;)&lt;/strong&gt;.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;numeric&lt;/strong&gt;&amp;nbsp;is functionally identical to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;decimal&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;p (precision)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;The maximum total number of decimal digits to be stored. This number includes both the left and the right sides of the decimal point. The precision must be a value from 1 through the maximum precision of 38. The default precision is 18.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;s&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;(scale)&lt;br /&gt;The number of decimal digits that are stored to the right of the decimal point. This number is subtracted from&amp;nbsp;&lt;i&gt;p&lt;/i&gt;&amp;nbsp;to determine the maximum number of digits to the left of the decimal point. Scale must be a value from 0 through&amp;nbsp;&lt;i&gt;p&lt;/i&gt;, and can only be specified if precision is specified. The default scale is 0 and so 0 &amp;lt;=&amp;nbsp;&lt;i&gt;s&lt;/i&gt;&amp;nbsp;&amp;lt;=&amp;nbsp;&lt;i&gt;p&lt;/i&gt;. Maximum storage sizes vary, based on the precision.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; width: 592px;&quot;&gt; &lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Storage bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;1 - 9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;10-19&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;20-28&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;29-38&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0cm;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting decimal and numeric data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;For&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data types, SQL Server considers each combination of precision and scale as a different data type. For example,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal(5,5)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal(5,0)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;are considered different data types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;In Transact-SQL statements, a constant with a decimal point is automatically converted into a&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data value, using the minimum precision and scale necessary. For example, the constant 12.345 is converted into a&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value with a precision of 5 and a scale of 3.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting from&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;to&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;real&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;can cause some loss of precision. Converting from&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;int&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;smallint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;tinyint&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;real&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;money&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;smallmoney&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;to either&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;can cause overflow.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;By default, SQL Server uses rounding when converting a number to a&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value with a lower precision and scale. Conversely, if the SET ARITHABORT option is ON, SQL Server raises an error when overflow occurs. Loss of only precision and scale isn&#39;t sufficient to raise an error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Prior to SQL Server 2016 (13.x), conversion of&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;values to&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;decimal&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;numeric&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is restricted to values of precision 17 digits only. Any&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value less than 5E-18 (when set using either the scientific notation of 5E-18 or the decimal notation of 0.000000000000000005) rounds down to 0. This is no longer a restriction as of SQL Server 2016 (13.x).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;money and smallmoney&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Data types that represent monetary or currency values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; width: 592px;&quot;&gt; &lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Data    type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;money&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;-922,337,203,685,477.5808   to 922,337,203,685,477.5807 (-922,337,203,685,477.58&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  to 922,337,203,685,477.58 for Informatica. Informatica only supports two   decimals, not four.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8 bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;smallmoney&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;-   214,748.3648 to 214,748.3647&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4 bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;money&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smallmoney&lt;/strong&gt;&amp;nbsp;data types are accurate to a ten-thousandth of the monetary units that they represent. For Informatica, the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;money&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smallmoney&lt;/strong&gt;&amp;nbsp;data types are accurate to a one-hundredth of the monetary units that they represent.Use a period to separate partial monetary units, like cents, from whole monetary units. For example, 2.15 specifies 2 dollars and 15 cents.These data types can use any one of the following currency symbols.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot;  o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot; path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot;  stroked=&quot;f&quot;&gt; &lt;v:stroke joinstyle=&quot;miter&quot;/&gt; &lt;v:formulas&gt;  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;/&gt;  &lt;v:f eqn=&quot;sum @0 1 0&quot;/&gt;  &lt;v:f eqn=&quot;sum 0 0 @1&quot;/&gt;  &lt;v:f eqn=&quot;prod @2 1 2&quot;/&gt;  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;/&gt;  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;/&gt;  &lt;v:f eqn=&quot;sum @0 0 1&quot;/&gt;  &lt;v:f eqn=&quot;prod @6 1 2&quot;/&gt;  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;/&gt;  &lt;v:f eqn=&quot;sum @8 21600 0&quot;/&gt;  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;/&gt;  &lt;v:f eqn=&quot;sum @10 21600 0&quot;/&gt; &lt;/v:formulas&gt; &lt;v:path o:extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot;/&gt; &lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;/&gt;&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Picture_x0020_1&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot;  alt=&quot;Table of currency symbols, hexadecimal values&quot; style=&#39;width:300pt;  height:607.5pt;visibility:visible;mso-wrap-style:square&#39;&gt; &lt;v:imagedata src=&quot;file:///C:/Users/Dell/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif&quot;   o:title=&quot;Table of currency symbols, hexadecimal values&quot;/&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img alt=&quot;Table of currency symbols, hexadecimal values&quot; height=&quot;810&quot; src=&quot;file:///C:/Users/Dell/AppData/Local/Temp/msohtmlclip1/01/clip_image001.gif&quot; v:shapes=&quot;Picture_x0020_1&quot; width=&quot;400&quot; /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Currency or monetary data does not need to be enclosed in single quotation marks ( &#39; ). It is important to remember that while you can specify monetary values preceded by a currency symbol, SQL Server does not store any currency information associated with the symbol, it only stores the numeric value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;converting-money-data&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting money data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When you convert to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;money&lt;/strong&gt;&amp;nbsp;from integer data types, units are assumed to be in monetary units. For example, the integer value of 4 is converted to the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;money&lt;/strong&gt;&amp;nbsp;equivalent of 4 monetary units.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The following example converts&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smallmoney&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;money&lt;/strong&gt;&amp;nbsp;values to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;decimal&lt;/strong&gt;&amp;nbsp;data types, respectively.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;float and real&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly. The ISO synonym for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;real&lt;/strong&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float(24)&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;[&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;)&lt;/strong&gt;&amp;nbsp;] Where&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;is the number of bits that are used to store the mantissa of the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;number in scientific notation and, therefore, dictates the precision and storage size. If&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;is specified, it must be a value between&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;1&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;53&lt;/strong&gt;. The default value of&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;53&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&lt;/em&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage    size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1-24&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;7 digits&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4 bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;25-53&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;15 digits&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8 bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;The SQL Server&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;[&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;(n)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;] data type complies with the ISO standard for all values of&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;from&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;1&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;through&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;53&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;. The synonym for&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;double precision&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&amp;nbsp;is&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;float(53)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 2&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Data    type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;float&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;-   1.79E+308 to -2.23E-308, 0 and 2.23E-308 to 1.79E+308&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Depends on   the value of&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;real&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;- 3.40E +   38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4 Bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;converting-float-and-real-data&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting float and real data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Values of&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;are truncated when they are converted to any integer type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When you want to convert from&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;real&lt;/strong&gt;&amp;nbsp;to character data, using the STR string function is usually more useful than CAST( ). This is because STR enables more control over formatting. For more information, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/str-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;STR (Transact-SQL)&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/functions?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Functions (Transact-SQL)&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Prior to SQL Server 2016 (13.x), conversion of&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;values to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;decimal&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;numeric&lt;/strong&gt;&amp;nbsp;is restricted to values of precision 17 digits only. Any&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;float&lt;/strong&gt;&amp;nbsp;value less than 5E-18 (when set using either the scientific notation of 5E-18 or the decimal notation of 0.000000000000000005) rounds down to 0. This is no longer a restriction as of SQL Server 2016 (13.x).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;date&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Defines a date in SQL Server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;date-description&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;date description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;date&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MyDate&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal format&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY-MM-DD&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  For more information, see the &quot;Backward Compatibility for Down-level   Clients&quot; section that follows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0001-01-01   through 9999-12-31 (1582-10-15 through 9999-12-31 for Informatica)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  January 1, 1 CE (Common Era) through December 31, 9999 CE (October 15, 1582   CE through December 31, 9999 CE for Informatica)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY is   four digits from 0001 to 9999 that represent a year. For Informatica, YYYY is   limited to the range 1582 to 9999.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  MM is two digits from 01 to 12 that represent a month in the specified year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  DD is two digits from 01 to 31, depending on the month, that represents a day   of the specified month.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10   positions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Precision,   scale&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10, 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3 bytes,   fixed&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   structure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1, 3-byte   integer stores date.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;One day&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  This value is used for the appended date part for implicit conversion from&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;time&lt;/strong&gt;&amp;nbsp;to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Calendar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Gregorian&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 15; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;supported-string-literal-formats-for-date&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Supported string literal formats for date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The following tables show the valid string literal formats for the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;&amp;nbsp;data type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 2&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Numeric&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;mdy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [m]m/dd/[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [m]m-dd-[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [m]m.dd.[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  myd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm/[yy]yy/dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm-[yy]yy/dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [m]m.[yy]yy.dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dmy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd/[m]m/[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd-[m]m-[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd.[m]m.[yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dym&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd/[yy]yy/[m]m&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd-[yy]yy-[m]m&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd.[yy]yy.[m]m&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ymd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [yy]yy/[m]m/dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [yy]yy-[m]m-dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [yy]yy-[m]m-dd&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;[m]m, dd,   and [yy]yy represent month, day, and year in a string with slash marks (/),   hyphens (-), or periods (.) as separators.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Only four- or two-digit years are supported. Use four-digit years whenever   possible. To specify an integer from 0001 to 9999 that represents the cutoff   year for interpreting two-digit years as four-digit years, use the&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-two-digit-year-cutoff-server-configuration-option?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Configure   the two digit year cutoff Server Configuration Option&lt;/a&gt;.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;Note:&lt;/strong&gt;&amp;nbsp;For   Informatica, YYYY is limited to the range 1582 to 9999.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  A two-digit year that is less than or equal to the last two digits of the   cutoff year is in the same century as the cutoff year. A two-digit year   greater than the last two digits of the cutoff year is in the century that   comes before the cutoff year. For example, if the two-digit year cutoff is the   default 2049, the two-digit year 49 is interpreted as 2049 and the two-digit   year 50 is interpreted as 1950.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The default date format is determined by the current language setting. You   can change the date format by using the&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-language-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   LANGUAGE&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-dateformat-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   DATEFORMAT&lt;/a&gt;&amp;nbsp;statements.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ydm&lt;/strong&gt;&amp;nbsp;format   isn&#39;t supported for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Alphabetical&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;mon   [dd][,] yyyy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mon dd[,] [yy]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mon yyyy [dd]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [dd] mon[,] yyyy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd mon[,][yy]yy&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  dd [yy]yy mon&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [dd] yyyy mon&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  yyyy mon [dd]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  yyyy [dd] mon&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;mon&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;represents the full month   name or the month abbreviation given in the current language. Commas are   optional and capitalization is ignored.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  To avoid ambiguity, use four-digit years.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  If the day is missing, the first day of the month is supplied.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; display: none; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-hide: all;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 4&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ISO 8601&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY-MM-DD&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  YYYYMMDD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Same as   the SQL standard. This format is the only format defined as an international   standard.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Unseparated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;[yy]yymmdd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  yyyy[mm][dd]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;&amp;nbsp;data can be specified with   four, six, or eight digits. A six- or eight-digit string is always   interpreted as&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ymd&lt;/strong&gt;. The month and   day must always be two digits. A four-digit string is interpreted as year.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; display: none; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-hide: all;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 6&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ODBC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;{ d   &#39;yyyy-mm-dd&#39; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ODBC API   specific.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;W3C    XML format&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 113.15pt;&quot; valign=&quot;top&quot; width=&quot;151&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;yyyy-mm-ddTZD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 330.6pt;&quot; valign=&quot;top&quot; width=&quot;441&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Supported   for XML/SOAP usage.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  TZD is the time zone designator (Z or +hh:mm or -hh:mm):&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  - hh:mm represents the time zone offset. hh is two digits, ranging from 0 to   14, that represent the number of hours in the time zone offset.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  - MM is two digits, ranging from 0 to 59, that represent the number of   additional minutes in the time zone offset.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  - + (plus) or - (minus) the mandatory sign of the time zone offset. This sign   indicates that, to obtain the local time, the time zone offset is added or   subtracted from the Coordinated Universal Times (UTC) time. The valid range   of time zone offset is from -14:00 to +14:00.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;ansi-and-iso-8601-compliance&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ANSI and ISO 8601 compliance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;date&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;complies with the ANSI SQL standard definition for the Gregorian calendar: &quot;NOTE 85 - Datetime data types will allow dates in the Gregorian format to be stored in the date range 0001-01-01 CE through 9999-12-31 CE.&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The default string literal format, which is used for down-level clients, complies with the SQL standard form that is defined as YYYY-MM-DD. This format is the same as the ISO 8601 definition for DATE.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime2&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Defines a date that is combined with a time of day that is based on 24-hour clock.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;can be considered as an extension of the existing&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&amp;nbsp;type that has a larger date range, a larger default fractional precision, and optional user-specified precision.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; width: 592px;&quot;&gt; &lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime2&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;[ (&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;fractional   seconds precision&lt;/em&gt;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MyDatetime2&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2(7)&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2(7)&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal format&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY-MM-DD   hh:mm:ss[.fractional seconds]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  For more information, see the &quot;Backward Compatibility for Down-level   Clients&quot; section that follows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Date range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0001-01-01   through 9999-12-31&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  January 1,1 CE through December 31, 9999 CE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00   through 23:59:59.9999999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;None&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY is a   four-digit number, ranging from 0001 through 9999, that represents a year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  MM is a two-digit number, ranging from 01 to 12, that represents a month in   the specified year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  DD is a two-digit number, ranging from 01 to 31 depending on the month, that   represents a day of the specified month.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  hh is a two-digit number, ranging from 00 to 23, that represents the hour.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is a two-digit number, ranging from 00 to 59, that represents the minute.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ss is a two-digit number, ranging from 00 to 59, that represents the second.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  n* is a zero- to seven-digit number from 0 to 9999999 that represents the   fractional seconds. In Informatica, the fractional seconds will be truncated   when n &amp;gt; 3.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;19   positions minimum (YYYY-MM-DD hh:mm:ss ) to 27 maximum (YYYY-MM-DD   hh:mm:ss.0000000)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Precision,   scale&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0 to 7   digits, with an accuracy of 100ns. The default precision is 7 digits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&amp;nbsp;&lt;/span&gt;&lt;sup style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 8.0pt; line-height: 107%;&quot;&gt;1&lt;/span&gt;&lt;/sup&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;6 bytes   for precision less than 3.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  7 bytes for precision 3 or 4.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  All other precision require 8 bytes.&lt;/span&gt;&lt;sup style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 8.0pt; line-height: 107%;&quot;&gt;2&lt;/span&gt;&lt;/sup&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;100   nanoseconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01   00:00:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Calendar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Gregorian&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 15; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 16; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;sup style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 9.0pt;&quot;&gt;1&lt;/span&gt;&lt;/sup&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;Provided values are for uncompressed rowstore. Use of&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;data compression&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-overview?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;columnstore&lt;/a&gt;&amp;nbsp;may alter storage size for each precision. Additionally, storage size on disk and in memory may differ. For example,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;values always require 8 bytes in memory when batch mode is used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;sup style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 9.0pt;&quot;&gt;2&lt;/span&gt;&lt;/sup&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;When a&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;value is cast to a&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;&amp;nbsp;value, an additional byte is added to the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;&amp;nbsp;value to store precision.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;For data type metadata, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/system-compatibility-views/sys-systypes-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;sys.systypes (Transact-SQL)&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/typeproperty-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;TYPEPROPERTY (Transact-SQL)&lt;/a&gt;. Precision and scale are variable for some date and time data types. To obtain the precision and scale for a column, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/columnproperty-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;COLUMNPROPERTY (Transact-SQL)&lt;/a&gt;,&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/col-length-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;COL_LENGTH (Transact-SQL)&lt;/a&gt;, or&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-columns-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;sys.columns (Transact-SQL)&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Defines a date that is combined with a time of day with fractional seconds that is based on a 24-hour clock.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;alert-title&quot; style=&quot;box-sizing: inherit; color: var(--theme-info-dark); margin: 0cm; max-width: 100%; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;Note&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;box-sizing: inherit; margin: 1rem 0px 0px; max-width: 100%; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;time&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset&lt;/strong&gt;&amp;nbsp;data types for new work. These types align with the SQL Standard. They are more portable.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;time&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset&lt;/strong&gt;&amp;nbsp;provide more seconds precision.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset&lt;/strong&gt;&amp;nbsp;provides time zone support for globally deployed applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;description&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MyDatetime&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal formats&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Not   applicable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Date range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;January 1,   1753, through December 31, 9999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00   through 23:59:59.997&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;None&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY is   four digits from 1753 through 9999 that represent a year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  MM is two digits, ranging from 01 to 12, that represent a month in the   specified year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  DD is two digits, ranging from 01 to 31 depending on the month, that   represent a day of the specified month.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  hh is two digits, ranging from 00 to 23, that represent the hour.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is two digits, ranging from 00 to 59, that represent the minute.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ss is two digits, ranging from 00 to 59, that represent the second.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  n* is zero to three digits, ranging from 0 to 999, that represent the   fractional seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;19   positions minimum to 23 maximum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8 bytes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Rounded to   increments of .000, .003, or .007 seconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01   00:00:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Calendar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Gregorian (Does   include the complete range of years.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 15; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;supported-string-literal-formats-for-datetime&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Supported string literal formats for datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The following tables list the supported string literal formats for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;. Except for ODBC,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&amp;nbsp;string literals are in single quotation marks (&#39;), for example, &#39;string_literaL&#39;. If the environment isn&#39;t&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;us_english&lt;/strong&gt;, the string literals should be in the format N&#39;string_literaL&#39;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 2&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Numeric&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Date   formats:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [0]4/15/[19]96 -- (mdy)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [0]4-15-[19]96 -- (mdy)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [0]4.15.[19]96 -- (mdy)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [0]4/[19]96/15 -- (myd)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  15/[0]4/[19]96 -- (dmy)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  15/[19]96/[0]4 -- (dym)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [19]96/15/[0]4 -- (ydm)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [19]96/[0]4/15 -- (ymd)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Time formats:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  14:30&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  14:30[:20:999]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  14:30[:20.9]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  4am&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  4 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;You can   specify date data with a numeric month specified. For example, 5/20/97   represents the twentieth day of May 1997. When you use numeric date format,   specify the month, day, and year in a string that uses slash marks (/), hyphens   (-), or periods (.) as separators. This string must appear in the following   form:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;number separator number separator   number [time] [time]&lt;/em&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  When the language is set to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;us_english&lt;/strong&gt;,   the default order for the date is mdy. You can change the date order by using   the&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-dateformat-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   DATEFORMAT&lt;/a&gt;&amp;nbsp;statement.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The setting for SET DATEFORMAT determines how date values are interpreted. If   the order doesn&#39;t match the setting, the values aren&#39;t interpreted as dates.   Out-of-order dates may be misinterpreted as out of range or with wrong   values. For example, 12/10/08 can be interpreted as one of six dates,   depending on the DATEFORMAT setting. A four-part year is interpreted as the   year.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Alphabetical&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Apr[il]   [15][,] 1996&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Apr[il] 15[,] [19]96&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Apr[il] 1996 [15]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [15] Apr[il][,] 1996&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  15 Apr[il][,][19]96&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  15 [19]96 apr[il]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  [15] 1996 apr[il]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  1996 APR[IL] [15]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  1996 [15] APR[IL]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;You can   specify date data with a month specified as the full month name. For example,   April or the month abbreviation of Apr specified in the current language;   commas are optional and capitalization is ignored.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Here are some guidelines for using alphabetical date formats:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  1) Enclose the date and time data in single quotation marks (&#39;). For   languages other than English, use N&#39;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  2) Characters that are enclosed in brackets are optional.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  3) If you specify only the last two digits of the year, values less than the   last two digits of the value of the&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-the-two-digit-year-cutoff-server-configuration-option?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Configure   the two digit year cutoff Server Configuration Option&lt;/a&gt;&amp;nbsp;configuration   option are in the same century as the cutoff year. Values greater than or   equal to the value of this option are in the century that comes before the   cutoff year. For example, if&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;two   digit year cutoff&lt;/strong&gt;&amp;nbsp;is 2050 (default), 25 is interpreted   as 2025 and 50 is interpreted as 1950. To avoid ambiguity, use four-digit   years.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  4) If the day is missing, the first day of the month is supplied.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The SET DATEFORMAT session setting isn&#39;t applied when you specify the month   in alphabetical form.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; display: none; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-hide: all;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 4&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ISO    8601&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY-MM-DDThh:mm:ss[.mmm]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  YYYYMMDD[ hh:mm:ss[.mmm]]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Examples:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  1) 2004-05-23T14:25:10&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  2) 2004-05-23T14:25:10.487&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  To use the ISO 8601 format, you must specify each element in the format,   including the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;T&lt;/strong&gt;, the colons (:),   and the period (.) that are shown in the format.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The brackets indicate that the fraction of second component is optional. The   time component is specified in the 24-hour format.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The T indicates the start of the time part of the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&amp;nbsp;value.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The advantage in using the ISO 8601 format is that it is an international   standard with unambiguous specification. Also, this format isn&#39;t affected by   the SET DATEFORMAT or&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-language-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   LANGUAGE&lt;/a&gt;&amp;nbsp;setting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Unseparated&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYYMMDD   hh:mm:ss[.mmm]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td aria-label=&quot;No value&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; display: none; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-hide: all;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 6&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ODBC&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 12.0pt; line-height: 107%;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 162.8pt;&quot; valign=&quot;top&quot; width=&quot;217&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;{ ts   &#39;1998-05-02 01:23:56.123&#39; }&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  { d &#39;1990-10-02&#39; }&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  { t &#39;13:33:41&#39; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem; width: 280.95pt;&quot; valign=&quot;top&quot; width=&quot;375&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The ODBC   API defines escape sequences to represent date and time values, which ODBC   calls timestamp data. This ODBC timestamp format is also supported by the OLE   DB language definition (DBGUID-SQL) supported by the Microsoft OLE DB   provider for SQL Server. Applications that use the ADO, OLE DB, and   ODBC-based APIs can use this ODBC timestamp format to represent dates and   times.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ODBC timestamp escape sequences are of the format: {&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;literal_type&lt;/em&gt;&amp;nbsp;&#39;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;constant_value&lt;/em&gt;&#39;   }:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  -&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;literal_type&lt;/em&gt;&amp;nbsp;specifies   the type of the escape sequence. Timestamps have three&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;literal_type&lt;/em&gt;&amp;nbsp;specifiers:&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  1) d = date only&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  2) t = time only&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  3) ts = timestamp (time + date)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  - &#39;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;constant_value&lt;/em&gt;&#39; is the   value of the escape sequence.&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;constant_value&lt;/em&gt;&amp;nbsp;must   follow these formats for each&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;literal_type&lt;/em&gt;.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  d : yyyy-mm-dd&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  t : hh:mm:ss[.fff]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ts : yyyy-mm-dd hh:mm:ss[.fff]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;rounding-of-datetime-fractional-second-precision&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Rounding of datetime fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;values are rounded to increments of .000, .003, or .007 seconds, as shown in the following table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 7&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-specified    value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;System    stored value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;01/01/98   23:59:59.999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1998-01-02   00:00:00.000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;01/01/98   23:59:59.995&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.996&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.997&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.998&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1998-01-01   23:59:59.997&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;01/01/98   23:59:59.992&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.993&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.994&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1998-01-01   23:59:59.993&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;01/01/98   23:59:59.990&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  01/01/98 23:59:59.991&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1998-01-01   23:59:59.990&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;ansi-and-iso-8601-compliance&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ANSI and ISO 8601 compliance&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetime&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;isn&#39;t ANSI or ISO 8601 compliant.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;_datetime&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting date and time data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When you convert to date and time data types, SQL Server rejects all values it can&#39;t recognize as dates or times. For information about using the CAST and CONVERT functions with date and time data, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;CAST and CONVERT (Transact-SQL)&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h3 id=&quot;converting-other-date-and-time-types-to-the-datetime-data-type&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.3125rem, 15.4737px + 1.15132vw, 1.75rem); margin-bottom: 13.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 22.5pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting other date and time types to the datetime data type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;This section describes what occurs when other date and time data types are converted to the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime&lt;/strong&gt;&amp;nbsp;data type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When the conversion is from&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;, the year, month, and day are copied. The time component is set to 00:00:00.000. The following code shows the results of converting a&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;date&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value to a&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;datetime&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Defines a date that is combined with a time of a day based on a 24-hour clock like&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;datetime2&lt;/a&gt;, and adds time zone awareness based on UTC (Universal Time Coordinate or Greenwich Mean Time).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;datetimeoffset-description&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td colspan=&quot;2&quot; style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan=&quot;3&quot; style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;[ (&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;fractional   seconds precision&lt;/em&gt;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MyDatetimeoffset&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset(7)&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset(7)&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal formats (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY-MM-DD   hh:mm:ss[.nnnnnnn] [{+|-}hh:mm]&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  For more information, see the &quot;Backward Compatibility for Down-level   Clients&quot; section that follows.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Date range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0001-01-01   through 9999-12-31&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  January 1, 1 CE through December 31, 9999 CE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00   through 23:59:59.9999999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;-14:00   through +14:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY is   four digits, ranging from 0001 through 9999, that represent a year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  MM is two digits, ranging from 01 to 12, that represent a month in the   specified year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  DD is two digits, ranging from 01 to 31 depending on the month, that   represent a day of the specified month.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  hh is two digits, ranging from 00 to 23, that represent the hour.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is two digits, ranging from 00 to 59, that represent the minute.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ss is two digits, ranging from 00 to 59, that represent the second.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  n* is zero to seven digits, ranging from 0 to 9999999, that represent the   fractional seconds.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  hh is two digits that range from -14 to +14.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is two digits that range from 00 to 59.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;26   positions minimum (YYYY-MM-DD hh:mm:ss {+|-}hh:mm) to 34 maximum (YYYY-MM-DD   hh:mm:ss.nnnnnnn {+|-}hh:mm)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Precision,   scale&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;See the   table below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10 bytes,   fixed is the default with the default of 100ns fractional second precision.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;100   nanoseconds&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01   00:00:00 00:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Calendar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Gregorian&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 15; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 16; outline-color: inherit;&quot;&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Specified    scale&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Result    (precision, scale)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Column    length (bytes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Fractional    seconds precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 18; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(34,7)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 19; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(0)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(26,0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 20; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(1)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(28,1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 21; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(2)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(29,2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 22; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(3)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(30,3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3-4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 23; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(4)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(31,4)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3-4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 24; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(5)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(32,5)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 25; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(6)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(33,6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 26; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;datetimeoffset(7)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;2&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(34,7)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;!--[if !supportMisalignedColumns]--&gt; &lt;tr height=&quot;0&quot;&gt;  &lt;td style=&quot;border: none;&quot; width=&quot;161&quot;&gt;&lt;/td&gt;  &lt;td style=&quot;border: none;&quot; width=&quot;44&quot;&gt;&lt;/td&gt;  &lt;td style=&quot;border: none;&quot; width=&quot;44&quot;&gt;&lt;/td&gt;  &lt;td style=&quot;border: none;&quot; width=&quot;165&quot;&gt;&lt;/td&gt;  &lt;td style=&quot;border: none;&quot; width=&quot;177&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;!--[endif]--&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;smalldatetime&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Defines a date that is combined with a time of day. The time is based on a 24-hour day, with seconds always zero (:00) and without fractional seconds.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;smalldatetime description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;smalldatetime&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MySmalldatetime&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smalldatetime&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smalldatetime&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal formats&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Not   applicable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Date range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01   through 2079-06-06&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  January 1, 1900, through June 6, 2079&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00   through 23:59:59&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  2007-05-09 23:59:59 will round to&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  2007-05-10 00:00:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;YYYY is   four digits, ranging from 1900, to 2079, that represent a year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  MM is two digits, ranging from 01 to 12, that represent a month in the   specified year.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  DD is two digits, ranging from 01 to 31 depending on the month, that   represent a day of the specified month.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  hh is two digits, ranging from 00 to 23, that represent the hour.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is two digits, ranging from 00 to 59, that represent the minute.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ss is two digits, ranging from 00 to 59, that represent the second. Values   that are 29.998 seconds or less are rounded down to the nearest minute.   Values of 29.999 seconds or more are rounded up to the nearest minute.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;19   positions maximum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4 bytes,   fixed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;One minute&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;1900-01-01   00:00:00&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Calendar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Gregorian&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (Doesn&#39;t include the complete range of years.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;background: white; color: #161616;&quot;&gt;Defines a time of a day. The time is without time zone awareness and is based on a 24-hour clock.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Property&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td colspan=&quot;3&quot; style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;[ (&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;fractional   second scale&lt;/em&gt;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;DECLARE   @MyTime&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;time(7)&lt;/strong&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  CREATE TABLE Table1 ( Column1&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;time(7)&lt;/strong&gt;&amp;nbsp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;fractional seconds scale&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Specifies   the number of digits for the fractional part of the seconds.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  This can be an integer from 0 to 7. For Informatica, this can be an integer   from 0 to 3.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  The default fractional scale is 7 (100ns).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   string literal format&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (used for down-level client)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;hh:mm:ss[.nnnnnnn]   for Informatica)&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  For more information, see the&amp;nbsp;&lt;a data-linktype=&quot;self-bookmark&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/time-transact-sql?view=sql-server-ver16#BackwardCompatibilityforDownlevelClients&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Backward   Compatibility for Down-level Clients&lt;/a&gt;&amp;nbsp;section.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00.0000000   through 23:59:59.9999999 (00:00:00.000 through 23:59:59.999 for Informatica)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 6; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Element   ranges&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;hh is two   digits, ranging from 0 to 23, that represent the hour.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  mm is two digits, ranging from 0 to 59, that represent the minute.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  ss is two digits, ranging from 0 to 59, that represent the second.&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  n* is zero to seven digits, ranging from 0 to 9999999, that represent the   fractional seconds. For Informatica, n* is zero to three digits, ranging from   0 to 999.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 7; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character   length&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;8   positions minimum (hh:mm:ss) to 16 maximum (hh:mm:ss.nnnnnnn). For   Informatica, the maximum is 12 (hh:mm:ss.nnn).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 8; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Precision,   scale&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  (user specifies scale only)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;See the   table below.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 9; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Storage   size&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5 bytes,   fixed, is the default with the default of 100ns fractional second precision.   In Informatica, the default is 4 bytes, fixed, with the default of 1ms   fractional second precision.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 10; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Accuracy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;100   nanoseconds (1 millisecond in Informatica)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 11; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Default   value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;00:00:00&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  This value is used for the appended time part for implicit conversion from&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;date&lt;/strong&gt;&amp;nbsp;to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetime2&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;datetimeoffset&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 12; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;User-defined   fractional second precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Yes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 13; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Time zone   offset aware and preservation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 14; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Daylight   saving aware&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td colspan=&quot;3&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;No&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;thead&gt;  &lt;tr&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Specified    scale&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Result    (precision, scale)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Column    length (bytes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Fractional&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;   &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;   seconds&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;   &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;   precision&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 16; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(16,7)   [(12,3) in Informatica]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5 (4 in   Informatica)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;7 (3 in   Informatica)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 17; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(0)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(8,0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 18; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(1)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(10,1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 19; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(2)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(11,2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;0-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 20; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(3)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(12,3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3-4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 21; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(4)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Not supported in Informatica.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(13,4)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;3-4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 22; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(5)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Not supported in Informatica.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(14,5)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 23; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(6)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Not supported in Informatica.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(15,6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 24; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;time(7)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  &lt;br style=&quot;box-sizing: inherit; outline-color: inherit;&quot; /&gt;  Not supported in Informatica.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;(16,7)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;5-7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;char and varchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character data types that are either fixed-size,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;, or variable-size,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;. Starting with SQL Server 2019 (15.x), when a UTF-8 enabled collation is used, these data types store the full range of&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16#Unicode_Defn&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Unicode&lt;/a&gt;&amp;nbsp;character data and use the&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-8&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UTF-8&lt;/a&gt;&amp;nbsp;character encoding. If a non-UTF-8 collation is specified, then these data types store only a subset of characters supported by the corresponding code page of that collation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;arguments&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h4 id=&quot;char---n--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;char [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Fixed-size string data.&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the string size in bytes and must be a value from 1 through 8,000. For single-byte encoding character sets such as&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;Latin&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, the storage size is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes and the number of characters that can be stored is also&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. For multibyte encoding character sets, the storage size is still&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes but the number of characters that can be stored may be smaller than&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. The ISO synonym for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;character&lt;/strong&gt;. For more information on character sets, see&amp;nbsp;&lt;a data-linktype=&quot;absolute-path&quot; href=&quot;https://learn.microsoft.com/en-us/cpp/c-runtime-library/single-byte-and-multibyte-character-sets&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Single-Byte and Multibyte Character Sets&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;varchar---n--max--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varchar [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;| max ) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-size string data. Use&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;to define the string size in bytes and can be a value from 1 through 8,000, or use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;max&lt;/strong&gt;&amp;nbsp;to indicate a column constraint size up to a maximum storage of 2^31-1 bytes (2 GB). For single-byte encoding character sets such as&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;Latin&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, the storage size is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes + 2 bytes and the number of characters that can be stored is also&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. For multibyte encoding character sets, the storage size is still&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes + 2 bytes but the number of characters that can be stored may be smaller than&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. The ISO synonyms for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;&amp;nbsp;are&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;charvarying&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;charactervarying&lt;/strong&gt;. For more information on character sets, see&amp;nbsp;&lt;a data-linktype=&quot;absolute-path&quot; href=&quot;https://learn.microsoft.com/en-us/cpp/c-runtime-library/single-byte-and-multibyte-character-sets&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Single-Byte and Multibyte Character Sets&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;A common misconception is to think that with&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;, the&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the number of characters. However, in&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;, the&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the string length in&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;bytes&lt;/strong&gt;&amp;nbsp;(0 to 8,000).&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;never defines numbers of characters that can be stored. This is similar to the definition of&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;nchar(&lt;/span&gt;&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;nvarchar(&lt;/span&gt;&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The misconception happens because when using single-byte encoding, the storage size of char and varchar is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes and the number of characters is also&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. However, for multibyte encoding such as&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-8&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UTF-8&lt;/a&gt;, higher Unicode ranges (128 to 1,114,111) result in one character using two or more bytes. For example, in a column defined as&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char(10)&lt;/strong&gt;, the Database Engine can store 10 characters that use single-byte encoding (Unicode range 0 to 127), but fewer than 10 characters when using multibyte encoding (Unicode range 128 to 1,114,111). For more information about Unicode storage and character ranges, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16#storage_differences&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Storage differences between UTF-8 and UTF-16&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified in a data definition or variable declaration statement, the default length is 1. If&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified when using the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;CAST&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;CONVERT&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;functions, the default length is 30.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Objects that use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;&amp;nbsp;are assigned the default collation of the database, unless a specific collation is assigned using the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;COLLATE&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;clause. The collation controls the code page that is used to store the character data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Multibyte encodings in SQL Server include:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l9 level1 lfo10; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Double-byte character sets (DBCS) for some East Asian languages using code pages 936 and 950 (Chinese), 932 (Japanese), or 949 (Korean).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; mso-list: l9 level1 lfo10; outline-color: inherit; overflow-wrap: break-word; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;UTF-8 with code page 65001.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin-left: 64.5pt; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Applies to:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;SQL Server 2019 (15.x) and later versions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;If you have sites that support multiple languages:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l4 level1 lfo11; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Starting with SQL Server 2019 (15.x), consider using a UTF-8 enabled collation to support Unicode and minimize character conversion issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l4 level1 lfo11; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;If using a previous version of the SQL Server Database Engine, consider using the Unicode&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;data types to minimize character conversion issues.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;If you use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;, we recommend that you:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l2 level1 lfo12; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries are consistent.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l2 level1 lfo12; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries vary considerably.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l2 level1 lfo12; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar(max)&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries vary considerably, and the string length might exceed 8,000 bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;If&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;SET ANSI_PADDING&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;OFF&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;when either&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;CREATE TABLE&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;ALTER TABLE&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is executed, a&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;char&lt;/strong&gt;&amp;nbsp;column that is defined as NULL is handled as&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varchar&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ntext, text, and image&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif; font-size: 11pt; line-height: 107%;&quot;&gt;Fixed and variable-length data types for storing large non-Unicode and Unicode character and binary data. Unicode data uses the Unicode UCS-2 character set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/h1&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: yellow; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-highlight: yellow;&quot;&gt;All three data types deprecated in latest version. Same will be removed in future versions of SQL server&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;ntext&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ntext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 11.0pt;&quot;&gt;Variable-length Unicode data with a maximum string length of 2^30 - 1 (1,073,741,823) bytes. Storage size, in bytes, is two times the string length that is entered. The ISO synonym for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ntext&lt;/strong&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national text&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;text&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length non-Unicode data in the code page of the server and with a maximum string length of 2^31-1 (2,147,483,647). When the server code page uses double-byte characters, the storage is still 2,147,483,647 bytes. Depending on the character string, the storage size may be less than 2,147,483,647 bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;image&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;image&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The following functions and statements can be used with&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ntext&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;text&lt;/strong&gt;, or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;image&lt;/strong&gt;&amp;nbsp;data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 560px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; height: 20.65pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; height: 20.65pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Functions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; height: 20.65pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; height: 20.65pt; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/datalength-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;DATALENGTH&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/readtext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;READTEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; height: 20.65pt; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/patindex-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;PATINDEX&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-textsize-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   TEXTSIZE&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; height: 20.65pt; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SUBSTRING&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/updatetext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UPDATETEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; height: 20.65pt; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/text-and-image-functions-textptr-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;TEXTPTR&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 20.65pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/writetext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;WRITETEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; height: 41.8pt; mso-yfti-irow: 5; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 41.8pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/text-and-image-functions-textvalid-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;TEXTVALID&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td aria-label=&quot;No value&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; height: 41.8pt; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;nchar and nvarchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Character data types that are either fixed-size,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;, or variable-size,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;. Starting with SQL Server 2012 (11.x), when a&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16#Supplementary_Characters&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Supplementary Character (SC)&lt;/a&gt;&amp;nbsp;enabled collation is used, these data types store the full range of&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16#Unicode_Defn&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Unicode&lt;/a&gt;&amp;nbsp;character data and use the&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UTF-16&lt;/a&gt;&amp;nbsp;character encoding. If a non-SC collation is specified, then these data types store only the subset of character data supported by the&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/Universal_Coded_Character_Set#Encoding_forms&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UCS-2&lt;/a&gt;&amp;nbsp;character encoding.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;arguments&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h4 id=&quot;nchar---n--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;nchar [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Fixed-size string data.&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the string size in byte-pairs, and must be a value from 1 through 4,000. The storage size is two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes. For&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-16#U+0000_to_U+D7FF_and_U+E000_to_U+FFFF&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UCS-2&lt;/a&gt;&amp;nbsp;encoding, the storage size is two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes and the number of characters that can be stored is also&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. For UTF-16 encoding, the storage size is still two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes, but the number of characters that can be stored may be smaller than&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;because Supplementary Characters use two byte-pairs (also called&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;surrogate-pair&lt;/a&gt;). The ISO synonyms for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;are&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national char&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national character&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;nvarchar---n--max--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;nvarchar [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;| max ) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-size string data.&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the string size in byte-pairs, and can be a value from 1 through 4,000.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;max&lt;/strong&gt;&amp;nbsp;indicates that the maximum storage size is 2^31-1 characters (2 GB). The storage size is two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes + 2 bytes. For&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-16#U+0000_to_U+D7FF_and_U+E000_to_U+FFFF&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UCS-2&lt;/a&gt;&amp;nbsp;encoding, the storage size is two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes + 2 bytes and the number of characters that can be stored is also&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;. For UTF-16 encoding, the storage size is still two times&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes + 2 bytes, but the number of characters that can be stored may be smaller than&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;because Supplementary Characters use two byte-pairs (also called&amp;nbsp;&lt;a data-linktype=&quot;external&quot; href=&quot;https://www.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;surrogate-pair&lt;/a&gt;). The ISO synonyms for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;are&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national char varying&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national character varying&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;A common misconception is to think that with&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;, the&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the number of characters. However, in&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar(&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;, the&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;defines the string length in&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;byte-pairs&lt;/strong&gt;&amp;nbsp;(0-4,000).&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;never defines numbers of characters that can be stored. This is similar to the definition of&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-ver16&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;char(&lt;/span&gt;&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;varchar(&lt;/span&gt;&lt;/strong&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;n&lt;/span&gt;&lt;/b&gt;&lt;/em&gt;&lt;strong&gt;&lt;span style=&quot;text-decoration-line: none;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The misconception happens because when using characters defined in the Unicode range 0 to 65,535, one character can be stored per each byte-pair. However, in higher Unicode ranges (65,536 to 1,114,111) one character may use two byte-pairs. For example, in a column defined as&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar(10)&lt;/strong&gt;, the Database Engine can store 10 characters that use one byte-pair (Unicode range 0 to 65,535), but fewer than 10 characters when using two byte-pairs (Unicode range 65,536 to 1,114,111). For more information about Unicode storage and character ranges, see&amp;nbsp;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-ver16#storage_differences&quot; style=&quot;background-color: rgba(0, 0, 0, 0); box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;Storage differences between UTF-8 and UTF-16&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified in a data definition or variable declaration statement, the default length is 1. When&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified with the CAST function, the default length is 30.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;If you use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;, we recommend that you:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l3 level1 lfo13; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries are consistent.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l3 level1 lfo13; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries vary considerably.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l3 level1 lfo13; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar(max)&lt;/strong&gt;&amp;nbsp;when the sizes of the column data entries vary considerably, and the string length might exceed 4,000 byte-pairs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;sysname&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is a system-supplied user-defined data type that is functionally equivalent to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar(128)&lt;/strong&gt;, except that it isn&#39;t nullable.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;sysname&lt;/strong&gt;&amp;nbsp;is used to reference database object names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Objects that use&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;are assigned the default collation of the database unless a specific collation is assigned using the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;COLLATE&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;clause.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;SET ANSI_PADDING&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is always&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;ON&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;.&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;SET ANSI_PADDING OFF&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;doesn&#39;t apply to the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nchar&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;data types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Prefix a Unicode character string constants with the letter&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;N&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;to signal UCS-2 or UTF-16 input, depending on whether an SC collation is used or not. Without the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;N&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;prefix, the string is converted to the default code page of the database that may not recognize certain characters. Starting with SQL Server 2019 (15.x), when a UTF-8 enabled collation is used, the default code page is capable of storing the Unicode UTF-8 character set.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When prefixing a string constant with the letter&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;N&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, the implicit conversion will result in a UCS-2 or UTF-16 string if the constant to convert doesn&#39;t exceed the max length for the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar&lt;/strong&gt;&amp;nbsp;string data type (4,000). Otherwise, the implicit conversion will result in a large-value&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;nvarchar(max)&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ntext, text, and image&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;Fixed and variable-length data types for storing large non-Unicode and Unicode character and binary data. Unicode data uses the Unicode UCS-2 character set.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;ntext&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;text&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: major-fareast;&quot;&gt;image&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;data types will be removed in a future version of SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #D7EAF8;&quot;&gt;nvarchar(max)&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/char-and-varchar-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #D7EAF8;&quot;&gt;varchar(max)&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/data-types/binary-and-varbinary-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: #D7EAF8;&quot;&gt;varbinary(max)&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background: #D7EAF8; color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;instead.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 style=&quot;background: white; margin-bottom: 9.0pt; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h4 id=&quot;ntext&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ntext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length Unicode data with a maximum string length of 2^30 - 1 (1,073,741,823) bytes. Storage size, in bytes, is two times the string length that is entered. The ISO synonym for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ntext&lt;/strong&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;national text&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;text&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length non-Unicode data in the code page of the server and with a maximum string length of 2^31-1 (2,147,483,647). When the server code page uses double-byte characters, the storage is still 2,147,483,647 bytes. Depending on the character string, the storage size may be less than 2,147,483,647 bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;image&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;image&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length binary data from 0 through 2^31-1 (2,147,483,647) bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The following functions and statements can be used with&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;ntext&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;text&lt;/strong&gt;, or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;image&lt;/strong&gt;&amp;nbsp;data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Functions&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/datalength-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;DATALENGTH&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/readtext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;READTEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/patindex-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;PATINDEX&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/statements/set-textsize-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SET   TEXTSIZE&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;SUBSTRING&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/updatetext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;UPDATETEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 4; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/text-and-image-functions-textptr-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;TEXTPTR&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/queries/writetext-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;WRITETEXT&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 5; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;a data-linktype=&quot;relative-path&quot; href=&quot;https://learn.microsoft.com/en-us/sql/t-sql/functions/text-and-image-functions-textvalid-transact-sql?view=sql-server-ver16&quot; style=&quot;box-sizing: inherit; cursor: pointer; outline-color: inherit; outline-style: initial; outline-width: 0px; overflow-wrap: break-word;&quot;&gt;TEXTVALID&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td aria-label=&quot;No value&quot; style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;background: white; margin-top: 0cm;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;binary and varbinary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/h1&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Binary data types of either fixed length or variable length.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;arguments&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h4 id=&quot;binary---n--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;binary [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Fixed-length binary data with a length of&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes, where&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;is a value from 1 through 8,000. The storage size is&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 id=&quot;varbinary---n--max--&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.125rem, 13.2632px + 0.986842vw, 1.5rem); margin-bottom: 4.5pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 27.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varbinary [ (&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-style: normal;&quot;&gt;n&lt;/span&gt;&lt;/em&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;| max ) ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Variable-length binary data.&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;can be a value from 1 through 8,000.&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;max&lt;/strong&gt;&amp;nbsp;indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of the data entered + 2 bytes. The data that is entered can be 0 bytes in length. The ANSI SQL synonym for&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;&amp;nbsp;is&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary varying&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2 id=&quot;remarks&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Remarks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;The default length is 1 when&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified in a data definition or variable declaration statement. When&amp;nbsp;&lt;em style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;n&lt;/em&gt;&amp;nbsp;isn&#39;t specified with the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;CAST&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;function, the default length is 30.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;table aria-label=&quot;Table 1&quot; border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: var(--theme-table-border-dark); box-sizing: inherit; font-size: 0.875rem; margin-top: 1rem; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-yfti-tbllook: 1184; outline-color: inherit; width: 592px;&quot;&gt; &lt;thead style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;  &lt;tr style=&quot;box-sizing: inherit; mso-yfti-firstrow: yes; mso-yfti-irow: 0; outline-color: inherit;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Data    type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: .75pt .75pt .75pt .75pt;&quot; valign=&quot;top&quot;&gt;   &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Use    when ...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt;&lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 1; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;binary&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;the sizes   of the column data entries are consistent.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 2; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varbinary&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;the sizes   of the column data entries vary considerably.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr style=&quot;box-sizing: inherit; mso-yfti-irow: 3; mso-yfti-lastrow: yes; outline-color: inherit;&quot;&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-image: initial; border-left: 1pt solid windowtext; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varbinary(max)&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style=&quot;border-bottom: 1pt solid windowtext; border-left: none; border-right: 1pt solid windowtext; border-top: var(--theme-table-border-dark); box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word; padding: 0.5rem;&quot; valign=&quot;top&quot;&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;the column   data entries exceed 8,000 bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 id=&quot;convert-binary-and-varbinary-data&quot; style=&quot;background: white; box-sizing: inherit; font-size: clamp(1.59375rem, 18.7895px + 1.39803vw, 2.125rem); margin-bottom: 9.0pt; margin-inline-start: -1.875rem; margin-left: 0cm; margin-right: 0cm; margin-top: 24.0pt; outline-color: inherit; padding-inline-start: 1.875rem;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Convert binary and varbinary data&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When converting data from a string data type to a&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;&amp;nbsp;data type of unequal length, SQL Server pads or truncates the data on the right. These string data types are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;char&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varchar&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;nchar&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;nvarchar&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;binary&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;varbinary&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;text&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;ntext&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 0cm; margin-left: 64.5pt; margin-right: 0cm; margin-top: 0cm; mso-list: l0 level1 lfo14; tab-stops: list 36.0pt; text-indent: -18.0pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #161616; font-family: Symbol; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: Symbol;&quot;&gt;·&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;image&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;When other data types are converted to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;, the data is padded or truncated on the left. Padding is achieved by using hexadecimal zeros.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;Converting data to the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;&amp;nbsp;data types is useful if&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;data is the easiest way to move around data. At some point, you might convert a value type to a binary value of large enough size and then convert it back. This conversion always results in the same value if both conversions are taking place on the same version of SQL Server. The binary representation of a value might change from version to version of SQL Server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white; box-sizing: inherit; margin: 1rem 0px 0px; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;You can convert&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;int&lt;/strong&gt;,&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;smallint&lt;/strong&gt;, and&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;tinyint&lt;/strong&gt;&amp;nbsp;to&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;or&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;varbinary&lt;/strong&gt;. If you convert the&amp;nbsp;&lt;strong style=&quot;box-sizing: inherit; outline-color: inherit;&quot;&gt;binary&lt;/strong&gt;&amp;nbsp;value back to an integer value, this value will be different from the original integer value if truncation has occurred. For example, the following SELECT statement shows that the integer value&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;123456&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;is stored as a binary&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: var(--theme-inline-code); border-radius: 3px; box-sizing: inherit; outline-color: inherit; overflow-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; font-size: 10.0pt;&quot;&gt;0x0001e240&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #161616; font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       &lt;span style=&quot;box-sizing: inherit; flex-grow: 1; outline-color: inherit;&quot;&gt;     &lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,sans-serif; mso-ansi-language: EN-US;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/4410103681445348054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-data-types.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/4410103681445348054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/4410103681445348054'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2023/03/sql-server-data-types.html' title='SQL Server - Data Types '/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-2280751839913324495</id><published>2012-08-01T03:42:00.001-07:00</published><updated>2023-03-07T10:35:16.672-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J Query"/><title type='text'>Dynamic Event Binding in JQuery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Create a sample form with button which used to create dynamic select tag and dynamic event binding&lt;/span&gt; &lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Here i am using the select tag for my test to bind the event dynamically. we are created a sample form that form contains one button for creating a dynamic select tag. We are going to write a change event for that dynamically created select tag.&amp;nbsp; &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The following code may explain how can i write a events for dynamically created elements in html using JQuery. For that we need jquery.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Source Code:&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;script src=&quot;jquery-1.6.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;var n=1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(document).ready(function(){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&quot;#createselect&quot;).click(function(){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;var newelement=$(document.createElement(&#39;div&#39;)).attr(&#39;id&#39;,&#39;test&#39;+n);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;newelement.html(&#39;&amp;lt;label&amp;gt;select tag&#39;+n+&#39;&amp;lt;/label&amp;gt;&amp;lt;select id=&quot;selectid&#39;+n+&#39;&quot; class=&quot;dynamicallycreated&quot; &amp;gt;&amp;lt;option&amp;gt;option1&amp;lt;/option&amp;gt;&amp;lt;option&amp;gt;option2&amp;lt;/option&amp;gt;&amp;lt;option&amp;gt;option3&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&#39;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;newelement.appendTo(&quot;#testing&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;n++&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(&#39;select.dynamicallycreated&#39;).live(&#39;change&#39;,function(){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(this).next(&#39;p&#39;).empty();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;$(this).after(&quot;&amp;lt;p&amp;gt;&quot;+$(this).val()+&quot; is selected&amp;lt;/p&amp;gt;&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;div id=&quot;testing&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;input type=&quot;button&quot; id=&quot;createselect&quot; value=&quot;create&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;This code is for creating any number of select tag and bind the change method for each element in dynamically. For that i used the live method also take class name as a selector of my test.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/2280751839913324495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2012/08/dynamic-event-binding-in-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/2280751839913324495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/2280751839913324495'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2012/08/dynamic-event-binding-in-jquery.html' title='Dynamic Event Binding in JQuery'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1908424108349367499.post-7463515951966402351</id><published>2012-08-01T00:12:00.000-07:00</published><updated>2023-03-07T10:35:16.672-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J Query"/><title type='text'>Create a Select Tag Dynamically Using Jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h3 style=&quot;color: blue;&quot;&gt;Create a Select Tag Dynamically Using Jquery and HTML&lt;/h3&gt;&lt;div style=&quot;color: #444444;&quot;&gt;From this blog, i want to share my any learning technology in program level. Today i want to create a select and input tag dynamically and and write the change event for all the select tag which are created dynamically.&lt;br /&gt;&lt;br /&gt;We can create a element using a method document.createElement() in javascript. After that we can add the id, name like this properties using .attr() method in Jquery.&lt;br /&gt;&lt;br /&gt;After setting all properties, we created our element but we need to join that element with document. For that we can use appendTo() or insertAfter() to join with already existing element in html document. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;Example coding for that: &lt;br /&gt;&lt;br /&gt;In javascript function:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;var newelemet=$(document.createElement(&#39;p&#39;)).attr(&#39;id&#39;,&#39;elementId&#39;);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newelement.html(&#39;This is the paragraph content&#39;);&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; this code only for creating a paragraph.&lt;br /&gt;After creating paragraph we need to append this to any existing element like div, etc..&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;b&gt;&lt;i&gt;newelement.appendTo(&quot;#dividtobeappend&quot;);&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;After that we can learn adding select tag also like that only..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding select also very simple if create a div or ol in the html document we cant add it easily.&lt;br /&gt;&lt;br /&gt;what i am done is create a one div containing a ol. In script i am create a list dynamically and within the the content of list i am create a select tag like following .&lt;br /&gt;&lt;br /&gt;1. Creating li element &lt;br /&gt;&amp;nbsp; &lt;b&gt;&lt;i&gt;var newelemet=$(document.createElement(&#39;li&#39;)).attr(&#39;id&#39;,&#39;elementId&#39;);&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;2. Adding select tag content using html() method.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;i&gt;&lt;b&gt;newelement.html(&#39;&amp;lt;select id=selectid &amp;gt;&amp;lt;option&amp;gt;option1&amp;lt;/option&amp;gt;&amp;lt;option&amp;gt;option2&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&#39;);&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;3. After adding the content we set into div using appendTo() method in jquery.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;b&gt; newelement.appendTo(&quot;divtobeappend&quot;);&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;These post is used for creating select element dynamically. We can write dynamic change method for let we see in next post.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #674ea7;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;background-color: #ffd966;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cmbaala.blogspot.com/feeds/7463515951966402351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cmbaala.blogspot.com/2012/08/create-select-tag-dynamically-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7463515951966402351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1908424108349367499/posts/default/7463515951966402351'/><link rel='alternate' type='text/html' href='http://cmbaala.blogspot.com/2012/08/create-select-tag-dynamically-using.html' title='Create a Select Tag Dynamically Using Jquery'/><author><name>Bala M</name><uri>http://www.blogger.com/profile/09444701805888769511</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>