<?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-9145097767317001746</id><updated>2024-09-08T18:37:56.841+05:30</updated><category term=".Net"/><category term="SQL"/><category term="Others"/><category term="Javascript"/><category term="C#"/><category term="Sharepoint"/><category term="WCF"/><category term="Wix installer"/><title type='text'>ASHIS KUMAR DAS</title><subtitle type='html'>This blog is helpful for .Net and SQL server programmer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-4589757839338893144</id><published>2018-04-15T13:50:00.001+05:30</published><updated>2018-04-15T13:50:49.481+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>75 Important queries in SQL Server every developer should know</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 class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this article we
will learn about some of the&amp;nbsp;&lt;b&gt;mostly used SQL Server queries&lt;/b&gt;&amp;nbsp;every
developer should know. These&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;queries&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;can be asked you as an&amp;nbsp;&lt;b&gt;Interview
Question&lt;/b&gt;&amp;nbsp;or they are handy for you in your day to day tasks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1. Create Table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this SQL Server
query we will learn&amp;nbsp;&lt;b&gt;How to create table in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Id INT,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Name Nvarchar(500),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Age INT &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2. Create table with primary key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we
will&amp;nbsp;&lt;b&gt;Create SQL Server table with primary key&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Id INT PRIMARY KEY,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Name Nvarchar(500),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Age INT &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; 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_11&quot; o:spid=&quot;_x0000_i1071&quot; type=&quot;#_x0000_t75&quot;
 alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know2.png&quot;
 style=&#39;width:310.5pt;height:100.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know2&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3. Create table with primary key and Identity
Column:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Id INT&amp;nbsp; IDENTITY(1,1) PRIMARY KEY,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Name Nvarchar(500),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Age INT &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4. Insert values into SQL Server table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this SQL Server
query we will learn about&amp;nbsp;&lt;b&gt;How to insert values into Sql Server table.&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT INTO TableName (Name,Age) VALUES (&#39;Max&#39;,30);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5. Insert multiple rows in a single query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will learn&amp;nbsp;&lt;b&gt;How to Insert Multiple Rows in a Single SQL Query&lt;/b&gt;. This
query is very important and generally asked in .Net Interview questions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT INTO TableName (Name,Age) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;VALUES (&#39;Max&#39;,30),(&#39;John&#39;,28),(&#39;Jack&#39;,31);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_10&quot; o:spid=&quot;_x0000_i1070&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know5.png&quot;
 style=&#39;width:314.25pt;height:193.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know5&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6. Update query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Update single record:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will update single record from a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE TableName SET NAME=&#39;Max Payne&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE Id=1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_9&quot; o:spid=&quot;_x0000_i1069&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know6.png&quot;
 style=&#39;width:322.5pt;height:243pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know6&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Update all records:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will update all records within a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE TableName SET AGE=31&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_8&quot; o:spid=&quot;_x0000_i1068&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know6.1.png&quot;
 style=&#39;width:229.5pt;height:168pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image004.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know6.1&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7. Delete query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Delete single record:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will delete single record from a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DELETE FROM TableName WHERE Id=1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Delete multiple records:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will delete all records from a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DELETE FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8. Select:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select all columns from a tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will select all columns from a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select specific columns:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this Sql query we
will select specific columns from a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT columnName1,ColumnName2 from TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9. Create View:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A view is a virtual
table created based on the result generated by SQL statement. Fields in a view
are directly related to one of more tables from database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE VIEW view_name AS SELECT Id,Name,Age&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Usage:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select * From view_name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10. Create Stored procedure:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to create stored procedure in Sql Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE PROCEDURE getInfoFromTable&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11. Get all column names from table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get all column names from Sql Server table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;where TABLE_NAME=&#39;TableName&#39;;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Get column names with data type:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select COLUMN_NAME,DATA_TYPE from
  INFORMATION_SCHEMA.COLUMNS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;where TABLE_NAME=&#39;TableName&#39;;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12. Search column name from database:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to search any column name from Sql Server database&lt;/b&gt;.
This query will look out for matching column names in database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT c.name AS ColName, t.name AS TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM sys.columns c&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;JOIN sys.tables t ON c.object_id = t.object_id&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE c.name LIKE &#39;%columnNameToSearch%&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&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;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;13. Get all user created tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get names of all user created tables in Sql Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT NAME FROM sys.objects WHERE TYPE=&#39;U&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;14. Get all view names:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get names of all views in Sql Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM sys.views&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;15. Get all stored procedure names:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get names of all stored procedure in Sql Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM sys.procedures&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;16. Counting rows for all tables at once:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to fetch the row count for all tables in a SQL SERVER
database&lt;/b&gt;. This query is very usefull when we want to know how many records
are present in tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 532.5pt;&quot; width=&quot;710&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;[TableName] = so.name, &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;[RowCount] = MAX(si.rows) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sysobjects so, &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sysindexes si &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;so.xtype = &#39;U&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;si.id = OBJECT_ID(so.name) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;GROUP BY &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;so.name &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2 DESC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_7&quot; o:spid=&quot;_x0000_i1067&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_16.png&quot;
 style=&#39;width:240pt;height:327pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_16&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;17. Get Comma Separated List of all columns in
table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get Comma Separated List of all columns in table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 532.5pt;&quot; width=&quot;710&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select TABLE_SCHEMA, TABLE_NAME&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;, Stuff(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select &#39;,&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ C.COLUMN_NAME&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;From INFORMATION_SCHEMA.COLUMNS As C&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Where C.TABLE_SCHEMA = T.TABLE_SCHEMA&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;And C.TABLE_NAME = T.TABLE_NAME&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Order By C.ORDINAL_POSITION&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;For Xml Path(&#39;&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;), 1, 1, &#39;&#39;) As Columns&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;From INFORMATION_SCHEMA.TABLES As T&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE T.TABLE_NAME=&#39;TableName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_6&quot; o:spid=&quot;_x0000_i1066&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_17.png&quot;
 style=&#39;width:268.5pt;height:75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image006.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_17&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;18. Generate ADO .net parameters:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Generate ADO .net&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;background: #F9F2F4; color: #c7254e; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SqlCommand&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;parameters in Sql Server&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;. Fellows who have worked on asp .net webforms
and ADO .net must know the pain of generating parameters for&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: #F9F2F4; color: #c7254e; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SqlCommand&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;object for large tables. I have written this query to save
my time and generate parameters on the fly. This is one of my favourate SQL Query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
  &#39;cmd.Parameters.AddWithValue(&quot;@&#39;+COLUMN_NAME+&#39;&quot;, &#39;+COLUMN_NAME+&#39;);&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM INFORMATION_SCHEMA.COLUMNS WHERE
  TABLE_NAME=&#39;TableName&#39;;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_5&quot; o:spid=&quot;_x0000_i1065&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_18.png&quot;
 style=&#39;width:435.75pt;height:156.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image007.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_18&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;19. Retrieve List of All Database names:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of all database names in Sql Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT Name FROM dbo.sysdatabases&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;OR&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_databases&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;20. Check default Language of SQL Server:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Check default Language of SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select @@language&amp;nbsp; AS DefaultLanguage&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;21. Check server name:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Check SQL Server instance name&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select @@SERVERNAME&amp;nbsp; AS ServerName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;22. Add columns to existing table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to add new column to existing SQL Server table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Syntax&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE {TABLENAME} &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ADD {COLUMNNAME} {TYPE}&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Usage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ADD Email NVARCHAR(50)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;23. Remove column from a table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to remove column from SQL Server Table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DROP COLUMN Email&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;24. Check column having NULL values only from
a table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to check if any column contains only NULL values in SQL
Server Table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;15&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;18&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;19&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 777.75pt;&quot; width=&quot;1037&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @col varchar(255), @cmd varchar(max)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE getinfo cursor for&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT c.name FROM sys.tables t JOIN sys.columns c ON
  t.Object_ID = c.Object_ID&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE t.Name = &#39;TableName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;OPEN getinfo&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FETCH NEXT FROM getinfo into @col&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHILE @@FETCH_STATUS = 0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @cmd = &#39;IF NOT EXISTS (SELECT top 1 * FROM
  TableName WHERE [&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+
  @col + &#39;] IS NOT NULL) BEGIN print &#39;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @col + &#39;&#39;&#39; end&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC(@cmd)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FETCH NEXT FROM getinfo into @col&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CLOSE getinfo&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DEALLOCATE getinfo&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;25. Get list of tables without primary key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of tables without primary key in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT SCHEMA_NAME(schema_id) AS SchemaName,name AS
  TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM sys.tables&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE OBJECTPROPERTY(OBJECT_ID,&#39;TableHasPrimaryKey&#39;) = 0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ORDER BY SchemaName, TableName;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;26. Get list of tables without having identity
column:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of tables without having identity column in
SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 532.5pt;&quot; width=&quot;710&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;TABLE_NAME FROM INFORMATION_SCHEMA.TABLES&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Table_NAME NOT IN&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DISTINCT c.TABLE_NAME FROM
  INFORMATION_SCHEMA.COLUMNS c&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INNER&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;JOIN sys.identity_columns ic&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;on&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(c.COLUMN_NAME=ic.NAME))&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;TABLE_TYPE =&#39;BASE TABLE&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;27. Get month names with month numbers:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get all month names with month number in SQL Server&lt;/b&gt;.
I have used this query to bind my dropdownlist with month name and month
number.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 852.75pt;&quot; width=&quot;1137&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;;WITH months(MonthNumber) AS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT 0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UNION ALL&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MonthNumber+1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM months&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE MonthNumber &amp;lt; 12&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
  DATENAME(MONTH,DATEADD(MONTH,-MonthNumber,GETDATE())) AS
  [MonthName],Datepart(MONTH,DATEADD(MONTH,-MonthNumber,GETDATE())) AS
  MonthNumber&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM months&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ORDER BY
  Datepart(MONTH,DATEADD(MONTH,-MonthNumber,GETDATE()))&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;28. Get name of current month:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get name of current month in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select DATENAME(MONTH, GETDATE()) AS CurrentMonth&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;29. Get name of day:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get name of day in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select DATENAME(WEEKDAY, GETDATE()) AS TodayIs&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;30. Get first date of current month:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to first date of current month in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
  CONVERT(VARCHAR(25),DATEADD(DAY,-(DAY(GETDATE()))+1,GETDATE()),105)
  FirstDate; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;31. Get last date of current month:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to last date of current month in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 604.5pt;&quot; width=&quot;806&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CONVERT(VARCHAR(25),DATEADD(DAY,-(DAY(GETDATE())),
  DATEADD(MONTH,1,GETDATE())),105) LastDate; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;32. Get first date of previous month:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to first date of previous month in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1, 0)
  FirstDayOfPreviousMonth &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;33. Get last date of previous month:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to last date of previous month in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1,
  -1) LastDayOfPreviousMonth&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;34. Get first date of current year:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to first date of current year in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT dateadd(year,datediff(year,0,getdate()),0)
  FirstDateOfYear&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;35. Get last date of current year:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to last date of current year in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 598.5pt;&quot; width=&quot;798&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
  dateadd(ms,-2,dateadd(year,0,dateadd(year,datediff(year,0,getdate())+1,0)))
  LasteDateOfYear&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;36. Select date without time:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to select date without time in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CONVERT(date, getdate()) AS DateWithoutTime&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;37. Select records within two dates:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to select records within two dates in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 540.75pt;&quot; width=&quot;721&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM EMPLOYEE&amp;nbsp; WHERE CONVERT(date,
  CreatedOn) BETWEEN &#39;1/1/2015&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND &#39;12/31/2016&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;Here&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background: #F9F2F4; color: #c7254e; font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Employee&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;is my table name and&amp;nbsp;&lt;b&gt;CreatedOn&lt;/b&gt;&amp;nbsp;is a name
of date column used for filtering.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;38. Calculate age from birth date:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to calculate age from birth date in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 1071.75pt;&quot; width=&quot;1424&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @date datetime, @tmpdate datetime, @years int,
  @months int, @days int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @date = &#39;05/05/1989&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @tmpdate = @date&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @years = DATEDIFF(yy, @tmpdate, GETDATE()) - CASE
  WHEN (MONTH(@date) &amp;gt; MONTH(GETDATE())) OR (MONTH(@date) = MONTH(GETDATE())
  AND DAY(@date) &amp;gt; DAY(GETDATE())) THEN 1 ELSE 0 END&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @tmpdate = DATEADD(yy, @years, @tmpdate)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @months = DATEDIFF(m, @tmpdate, GETDATE()) - CASE
  WHEN DAY(@date) &amp;gt; DAY(GETDATE()) THEN 1 ELSE 0 END&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @tmpdate = DATEADD(m, @months, @tmpdate)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @days = DATEDIFF(d, @tmpdate, GETDATE())&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @years AS Years, @months AS Months, @days AS Days&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;39. Get days between two dates:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get days between two dates in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DATEDIFF(DAY, &#39;1/1/2016&#39;, &#39;3/1/2016&#39;)
  DaysDifference&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;40. Truncate all tables using single query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to truncate all database tables using single query in
SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_MSforeachtable &#39;TRUNCATE TABLE ?&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;Please take proper backup before running
this query. This query will remove all data from all tables in selected
database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;41. Delete all records from all tables having
foreign keys:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to delete all rows from all tables in SQL Server which
have foreign keys&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_MSForEachTable &#39;ALTER TABLE ? NOCHECK CONSTRAINT
  ALL&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_MSForEachTable &#39;DELETE FROM ?&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_MSForEachTable &#39;ALTER TABLE ? CHECK CONSTRAINT
  ALL&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;42. Drop all tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to drop all tables with single query in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sys.sp_MSforeachtable @command1 = &#39;Drop Table ?&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;43. Reset identity seed after deleting records
in SQL Server:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Reset identity seed after deleting records in SQL
Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC CHECKIDENT (&#39;[TableName]&#39;, RESEED, 0); &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Make sure to delete all records before using
this query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;44. Select random rows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Select random rows from SQL Server table&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select N random Rows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM TableName ORDER BY NEWID() &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select N percent of random Rows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT TOP 5 PERCENT * FROM TableName ORDER BY NEWID() &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;45. Swap values of 2 columns:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to swap values of two columns in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Format:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE TableName SET Column1=Column2, Column2=Column1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Usage:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE TableName SET Name=Email,Email=Name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;46. Rename Database:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to rename database in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_renamedb &#39;oldName&#39;, &#39;newName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;OR&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER DATABASE oldName MODIFY NAME = newName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;47. Rename Table:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will learn
about&amp;nbsp;&lt;b&gt;How to rename Table in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_rename &#39;OldTableName&#39;, &#39;NewTableName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;48. Rename Table Column:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to rename Table Column in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC sp_rename &#39;TableName.OldColumnName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;, &#39;NewColumnName&#39;, &#39;COLUMN&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;49. Check SQL Server version:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to check version of SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT @@version&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_4&quot; o:spid=&quot;_x0000_i1064&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_49.png&quot;
 style=&#39;width:477pt;height:124.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image008.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_49&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;50. Get list of hard drives with free space:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of system hard drives with available free
space using SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC master..xp_fixeddrives&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;51. Get Id of latest inserted record:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Id of latest inserted record in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT INTO TableName (NAME,Email,Age) VALUES (&#39;Test User&#39;,&#39;test@gmail.com&#39;,30)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;-- Get Id of latest inserted record&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT SCOPE_IDENTITY()&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_3&quot; o:spid=&quot;_x0000_i1063&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_51.png&quot;
 style=&#39;width:475.5pt;height:303.75pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image009.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_51&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;52. Delete duplicate records:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to delete duplicate records in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE ID NOT IN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MAX(ID)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;GROUP BY DuplicateColumn)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;53. Display Text of Stored Procedure, Trigger,
View :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Display Text of Stored Procedure, Trigger, View in
SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;exec sp_helptext @objname = &#39;getInfoFromTable&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;-- Here getInfoFromTable is&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;my storedprocedure name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;54. Get List of Primary Key and Foreign Key
for a particular table :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of Primary Key and Foreign Key for a
particular table in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT&amp;nbsp; DISTINCT&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Constraint_Name AS [ConstraintName],&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Table_Schema AS [Schema],&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Table_Name AS [Table Name] FROM
  INFORMATION_SCHEMA.KEY_COLUMN_USAGE&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE
  INFORMATION_SCHEMA.KEY_COLUMN_USAGE.TABLE_NAME=&#39;TableName&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;55. Get List of Primary Key and Foreign Key of
entire database:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to get list of Primary Key and Foreign Key for a entire
database in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT&amp;nbsp; DISTINCT&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Constraint_Name AS [ConstraintName],&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Table_Schema AS [Schema],&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Table_Name AS [Table Name] FROM
  INFORMATION_SCHEMA.KEY_COLUMN_USAGE&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;56. Disable Trigger:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to disable trigger in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Disable particular trigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName DISABLE TRIGGER TriggerName&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Disable all triggers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName DISABLE TRIGGER ALL&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;57. Enable Trigger:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to enable trigger in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Enable particular trigger&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName ENABBLE TRIGGER TriggerName&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Enable all triggers&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER TABLE TableName ENABLE TRIGGER ALL&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 15.0pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;

&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;0&quot; style=&quot;color: #333333;&quot; width=&quot;100%&quot; /&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;58. Make database offline or online :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to make database offline or online in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Make database offline&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER DATABASE [ForTesting] SET OFFLINE&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Make Database online&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ALTER DATABASE [ForTesting] SET ONLINE&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;Make sure to select any other database
while using this query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;59. Backup Database :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to take backup of database using script in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;BACKUP DATABASE DataBaseName TO
  DISK=&#39;d:\NameOfBackupFile.bak&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;60. Restore Database :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to restore database using script in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;RESTORE DATABASE DataBaseName TO
  DISK=&#39;d:\NameOfBackupFile.bak&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;61. Search string in a single table :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to search string within a table in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM TableName WHERE Name LIKE &#39;%TextToSearch%&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;62. Search string in all tables :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to search string in all tables in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;13&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;15&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;16&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;18&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;19&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;21&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;22&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;23&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;24&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;26&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;27&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;28&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;29&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;31&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;32&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;33&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;34&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;36&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;37&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;38&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;39&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;40&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;41&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;42&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;43&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;44&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;45&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;46&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;47&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;48&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;49&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;51&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;52&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;53&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;54&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 598.5pt;&quot; width=&quot;798&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @SearchStr nvarchar(100)=&#39;textToSearch&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE #Results (ColumnName nvarchar(370),
  ColumnValue nvarchar(3630))&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET NOCOUNT ON&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @TableName nvarchar(256), @ColumnName
  nvarchar(128), @SearchStr2 nvarchar(110)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET&amp;nbsp; @TableName = &#39;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET @SearchStr2 = QUOTENAME(&#39;%&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @SearchStr + &#39;%&#39;,&#39;&#39;&#39;&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHILE @TableName IS NOT NULL&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET @ColumnName = &#39;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET @TableName = &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MIN(QUOTENAME(TABLE_SCHEMA) + &#39;.&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ QUOTENAME(TABLE_NAME))&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INFORMATION_SCHEMA.TABLES&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  TABLE_TYPE = &#39;BASE TABLE&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp;&amp;nbsp;&amp;nbsp; QUOTENAME(TABLE_SCHEMA) + &#39;.&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ QUOTENAME(TABLE_NAME) &amp;gt;
  @TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp;&amp;nbsp;&amp;nbsp; OBJECTPROPERTY(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;OBJECT_ID(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;QUOTENAME(TABLE_SCHEMA) + &#39;.&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ QUOTENAME(TABLE_NAME)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;), &#39;IsMSShipped&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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 style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;) = 0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT
  NULL)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET @ColumnName =&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MIN(QUOTENAME(COLUMN_NAME))&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INFORMATION_SCHEMA.COLUMNS&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  TABLE_SCHEMA&amp;nbsp;&amp;nbsp;&amp;nbsp; = PARSENAME(@TableName, 2)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp;&amp;nbsp;&amp;nbsp; TABLE_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp; =
  PARSENAME(@TableName, 1)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA_TYPE IN (&#39;char&#39;, &#39;varchar&#39;,
  &#39;nchar&#39;, &#39;nvarchar&#39;, &#39;int&#39;, &#39;decimal&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;AND&amp;nbsp;&amp;nbsp;&amp;nbsp; QUOTENAME(COLUMN_NAME) &amp;gt;
  @ColumnName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;IF @ColumnName IS NOT NULL&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;BEGIN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT INTO #Results&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&#39;SELECT &#39;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @TableName + &#39;.&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @ColumnName + &#39;&#39;&#39;, LEFT(&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @ColumnName + &#39;, 3630) &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM &#39; + @TableName + &#39;WITH (NOLOCK) &#39; +&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&#39; WHERE &#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @ColumnName + &#39; LIKE &#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;+ @SearchStr2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT ColumnName, ColumnValue FROM #Results&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;63. Replace a string in a SQL Server Table :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to replace a string in a SQL Server Table Column&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE TableName SET ColumnName = REPLACE(ColumnName, &#39;OldValue&#39;,
  &#39;NewValue&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;64. Left Outer Join :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use Left outer join in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM Table1 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;LEFT OUTER JOIN Table2 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;on t1.PrimaryColumn=t2.ForeignKeyColumn&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;65. Right Outer Join :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use Right outer join in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM Table1 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;RIGHT OUTER JOIN Table2 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;on t1.PrimaryColumn=t2.ForeignKeyColumn&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;66. Full Outer Join :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use Full outer join in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM Table1 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FULL OUTER JOIN Table2 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;on t1.PrimaryColumn=t2.ForeignKeyColumn&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;67. Inner Join :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use Inner join in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM Table1 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t1 &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INNER JOIN Table2 as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;t2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;on t1.PrimaryColumn=t2.ForeignKeyColumn&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;68. Cross Join :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use Cross join in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM Table1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CROSS JOIN Table2&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;69. IF ELSE :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use IF ELSE Statements in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @ValueToCheck INT;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET @ValueToCheck = 14;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;IF @ValueToCheck=15&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT &#39;Value is 15&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;As Result&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ELSE IF @ValueToCheck&amp;lt;15&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT &#39;Value is Less than 15&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;As Result&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ELSE IF @ValueToCheck&amp;gt;15&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT &#39;Value is greater than 15&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;As Result&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;70. CASE Expression :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to CASE Expression in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CASE Name&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHEN &#39;max&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;THEN &#39;Name is max&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHEN &#39;jack&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;
  &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;THEN &#39;Name is max&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ELSE &#39; You have selected other user&#39;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END AS Result&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Picture_x0020_2&quot;
 o:spid=&quot;_x0000_i1062&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_69.png&quot;
 style=&#39;width:300pt;height:292.5pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image010.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_69&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;71. Select Second highest salary :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to select second highest salary in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 540.75pt;&quot; width=&quot;721&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MAX(Salary) from Employee WHERE Salary NOT IN
  (select MAX(Salary) from Employee ); &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;72. Paging Example :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Implement paging in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM (SELECT&amp;nbsp; ROW_NUMBER() OVER(ORDER BY id)
  AS RowNum,* FROM Country)as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Result&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE RowNum&amp;gt;=20 AND RowNum&amp;lt;=40&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ORDER BY RowNum&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;73. Temporary Tables Example :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to use temporary tables in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;12&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 532.5pt;&quot; width=&quot;710&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DECLARE @TempTable TABLE&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &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 style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Id int&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;primary key,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Name varchar(50),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Email varchar(50)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT INTO @TempTable VALUES (1,&#39;Max&#39;,&#39;max@gmail.com&#39;),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(2,&#39;Tony&#39;,&#39;Tony@gmail.com&#39;),&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #c7254e; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&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;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(3,&#39;Jack&#39;,&#39;Jack@Indivar.com&#39;)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM @TempTable&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id=&quot;Picture_x0020_1&quot;
 o:spid=&quot;_x0000_i1061&quot; type=&quot;#_x0000_t75&quot; alt=&quot;http://www.codingfusion.com/postpics/image/75_Important_queries_in_SQL_Server_you_should_know_72.png&quot;
 style=&#39;width:5in;height:272.25pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:\Users\ashis_das\AppData\Local\Temp\msohtmlclip1\01\clip_image011.png&quot;
  o:title=&quot;75_Important_queries_in_SQL_Server_you_should_know_72&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;74. Delete duplicate rows :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to delete duplicate rows in SQL Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DELETE FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;WHERE ID NOT IN&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT MAX(ID)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FROM TableName&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;GROUP BY DuplicateColumn1, DuplicateColumn2)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 15.0pt; mso-outline-level: 3;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 18.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;75. Reset Identity Seed :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;In this query we will
learn about&amp;nbsp;&lt;b&gt;How to Reset identity seed after deleting records in SQL
Server&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 0px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 538.5pt;&quot; width=&quot;718&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DBCC CHECKIDENT (&#39;[YourTableName]&#39;, RESEED, 0);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: normal; margin-bottom: 7.5pt;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;Helvetica&amp;quot;,sans-serif; font-size: 10.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Note: Here 0 is the
number-1 from where you want to start your auto increment. Suppose you wants to
start auto increment your primary key value from 50 then you need to pass 49 in
the above method.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/4589757839338893144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2018/04/75-important-queries-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4589757839338893144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4589757839338893144'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2018/04/75-important-queries-in-sql-server.html' title='75 Important queries in SQL Server every developer should know'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-3874805302085641661</id><published>2015-10-05T15:13:00.000+05:30</published><updated>2015-10-05T15:13:16.715+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Difference between var and dynamic in C#</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;table class=&quot;ArticleTable&quot; style=&quot;background-color: white; border-collapse: collapse; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-width: 1px 0px 0px 1px; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px;&quot;&gt;&lt;thead style=&quot;background-color: #ebf6ff; border: 0px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot; valign=&quot;top&quot; width=&quot;399&quot;&gt;var&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot; valign=&quot;top&quot; width=&quot;399&quot;&gt;dynamic&lt;/td&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;Introduced in&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;C# 3.0&lt;/strong&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;Introduced in&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;C# 4.0&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Statically typed&lt;/strong&gt;&amp;nbsp;– This means the type of variable declared is decided by the compiler at compile time.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Dynamically typed&lt;/strong&gt;&amp;nbsp;- This means the type of variable declared is decided by the compiler at runtime time.&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot; valign=&quot;top&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Need&lt;/strong&gt;&amp;nbsp;to initialize at the time of declaration.&lt;br /&gt;
e.g.,&amp;nbsp;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;var str=”I am a string”;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
Looking at the value assigned to the variable&amp;nbsp;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;str&lt;/span&gt;&lt;/code&gt;, the compiler will treat the variable&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;str&lt;/code&gt;&amp;nbsp;&lt;/span&gt;as string.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;No&lt;/strong&gt;&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;need&lt;/strong&gt;&amp;nbsp;to initialize at the time of declaration.&lt;br /&gt;
e.g.,&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;dynamic str;&lt;/code&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;str=”I am a string”;&lt;/span&gt;&lt;/code&gt;&amp;nbsp;//Works fine and compiles&lt;br /&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;str=2;&lt;/span&gt;&lt;/code&gt;&amp;nbsp;//Works fine and compiles&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Errors are caught at compile time.&lt;/strong&gt;&lt;br /&gt;
Since the compiler knows about the type and the methods and properties of the type at the compile time itself&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Errors are caught at runtime&lt;/strong&gt;&lt;br /&gt;
Since the compiler comes to about the type and the methods and properties of the type at the run time.&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Visual Studio shows intellisense&lt;/strong&gt;&amp;nbsp;since the type of variable assigned is known to compiler.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;Intellisense is not available&lt;/strong&gt;&amp;nbsp;since the type and its related methods and properties can be known at run time only&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;&lt;br /&gt;
e.g.,&amp;nbsp;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;var obj1;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
will&amp;nbsp;&amp;nbsp;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;throw a compile error&lt;/strong&gt;&amp;nbsp;since the variable is not initialized. The compiler needs that this variable should be initialized so that it can infer a type from the value.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;e.g.,&amp;nbsp;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;dynamic obj1;&lt;/code&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;will compile;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot; valign=&quot;top&quot;&gt;e.g.&amp;nbsp;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;var obj1=1;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
will compile&lt;br /&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;var obj1=” I am a string”;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;/code&gt;&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;will throw error&lt;/strong&gt;&amp;nbsp;since the compiler has already decided that the type of obj1 is System.Int32 when the value 1 was assigned to it. Now assigning a string value to it violates the type safety.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-width: 0px 1px 1px 0px; margin: 0px; padding: 5px;&quot;&gt;e.g.&amp;nbsp;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;dynamic obj1=1;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
will compile and run&lt;br /&gt;
&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; font-stretch: normal; margin: 0px; padding: 0px;&quot;&gt;dynamic obj1=” I am a string”;&lt;/code&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px;&quot;&gt;will compile and run&lt;/strong&gt;&amp;nbsp;since the compiler creates the type for obj1 as System.Int32 and then recreates the type as string when the value “I am a string” was assigned to it.&lt;br /&gt;
This code will work fine.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/3874805302085641661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2015/10/difference-between-var-and-dynamic-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/3874805302085641661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/3874805302085641661'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2015/10/difference-between-var-and-dynamic-in-c.html' title='Difference between var and dynamic in C#'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-1397783794050840497</id><published>2015-04-08T15:59:00.001+05:30</published><updated>2015-04-08T15:59:08.848+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Last modified time of a file reside in FTP server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Add reference in your class:&lt;br /&gt;using System.Net;&lt;br /&gt;
Then copy below mentioned method&lt;br /&gt;&amp;nbsp;/// &amp;lt;summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Get Server File TimeStamp&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;serverPath&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;userId&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;password&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&amp;nbsp; &amp;lt;param name=&quot;fileName&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static DateTime GetServerFileTimestamp(string serverPath, string userId, string password, string fileName)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the object used to communicate with the server.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String serverUrl = String.Format(&quot;{0}{1}/{2}&quot;, @&quot;ftp:&quot;, serverPath, fileName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Uri serverUri = new Uri(serverUrl);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FtpWebRequest reqFTP = (FtpWebRequest)WebRequest.Create(serverUrl);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reqFTP.Method = WebRequestMethods.Ftp.GetDateTimestamp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reqFTP.Credentials = new NetworkCredential(userId, password);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; using (FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse())&lt;br /&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;br /&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; // Return the last modified time.&lt;br /&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; return response.LastModified;&lt;br /&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;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; // If the file doesn&#39;t exist, return min date Otherwise rethrow the error.&lt;br /&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; if (ex.Message.Contains(&quot;File unavailable&quot;))&lt;br /&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; return DateTime.MinValue;&lt;br /&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; throw;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; reqFTP = null;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Above mentioned code&amp;nbsp; will return you last modified time.&lt;br /&gt;
&lt;br /&gt;
Happy learning.............&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/1397783794050840497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/last-modified-time-of-file-reside-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/1397783794050840497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/1397783794050840497'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/last-modified-time-of-file-reside-in.html' title='Last modified time of a file reside in FTP server'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-4119234785573273538</id><published>2015-04-08T15:56:00.001+05:30</published><updated>2015-04-08T15:57:02.520+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Check ftp server is available or not</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Add reference in your class:&lt;br /&gt;
using System.Net;&lt;br /&gt;
Then copy below mentioned method&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// GetServerAvailability to check ftp server is available or not&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;userId&quot;&amp;gt;userId&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;password&quot;&amp;gt;password&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;ftpServerPath&quot;&amp;gt;ftpServerPath&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;returns&amp;gt;status&amp;lt;/returns&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static bool GetServerAvailability(string userId, string password, string ftpServerPath)&lt;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FtpWebRequest reqFTP;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool isServerConnected = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; String serverUrl = String.Format(&quot;{0}{1}&quot;, @&quot;ftp:&quot;, ftpServerPath);&lt;br /&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; reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(serverUrl));&lt;br /&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; reqFTP.UseBinary = true;&lt;br /&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; reqFTP.Credentials = new NetworkCredential(userId, password);&lt;br /&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; reqFTP.Method = WebRequestMethods.Ftp.ListDirectory;&lt;br /&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; reqFTP.Proxy = null;&lt;br /&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; reqFTP.KeepAlive = false;&lt;br /&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; using (WebResponse response = reqFTP.GetResponse())&lt;br /&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;br /&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; isServerConnected = true;&lt;br /&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;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;br /&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;br /&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; if (string.Compare(ex.GetType().ToString(), &quot;System.Net.Sockets.SocketException&quot;, true) == 0)&lt;br /&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;br /&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; System.Net.Sockets.SocketException socketError = (System.Net.Sockets.SocketException)ex;&lt;br /&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; if (socketError.ErrorCode == 11004)&lt;br /&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; isServerConnected = false;&lt;br /&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;br /&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; else&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&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; isServerConnected = false;&lt;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; reqFTP = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return isServerConnected;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Above mentioned code will return you true if server is available else false.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/4119234785573273538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/check-ftp-server-is-available-or-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4119234785573273538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4119234785573273538'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/check-ftp-server-is-available-or-not.html' title='Check ftp server is available or not'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-5061004777546697041</id><published>2015-04-08T15:52:00.001+05:30</published><updated>2015-04-08T15:55:34.913+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Upload file into FTP server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Add 2 reference in your class:&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt; System.Net;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt; System.IO;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;Then copy&amp;nbsp;below mentioned method&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
/// &amp;lt;summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Upload Design File into FTP server&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;serverPath&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;localPath&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;fileName&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;param name=&quot;settings&quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static bool UploadDesignFile(string serverPath, string localPath, string fileName,Dictionary&amp;lt;string,string&amp;gt; credentials)&lt;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool status = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FtpWebRequest reqFTP;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int bufferSize = 2048;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; String uploadUrl = String.Format(&quot;{0}{1}/{2}&quot;, @&quot;ftp:&quot;, serverPath, fileName);&lt;br /&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; reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uploadUrl));&lt;br /&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; string username = string.Empty;&lt;br /&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; credentials.TryGetValue(&quot;UserId&quot;,out username);&lt;br /&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; string passwd = string.Empty;&lt;br /&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; credentials.TryGetValue(&quot;Password&quot;,out passwd);&lt;br /&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; reqFTP.Credentials = new NetworkCredential(Decrypt(username), Decrypt(passwd));&lt;br /&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; reqFTP.UseBinary = true;&lt;br /&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; reqFTP.UsePassive = true;&lt;br /&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; reqFTP.KeepAlive = true;&lt;br /&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; reqFTP.Method = WebRequestMethods.Ftp.UploadFile;&lt;br /&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;br /&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; using (Stream uploadStream = reqFTP.GetRequestStream())&lt;br /&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;br /&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; string localFilePath = String.Format(&quot;{0}/{1}&quot;, localPath, fileName);&lt;br /&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; using (FileStream localFileStream = File.OpenRead(localFilePath))&lt;br /&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;br /&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; /* Buffer for the Downloaded Data */&lt;br /&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; byte[] byteBuffer = new byte[localFileStream.Length];&lt;br /&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; int bytesSent = localFileStream.Read(byteBuffer, 0, bufferSize);&lt;br /&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; /* Upload the File by Sending the Buffered Data Until the Transfer is Complete */&lt;br /&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; try&lt;br /&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;br /&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; while (bytesSent != 0)&lt;br /&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;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; uploadStream.Write(byteBuffer, 0, bytesSent);&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; bytesSent = localFileStream.Read(byteBuffer, 0, bufferSize);&lt;br /&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;br /&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; status = true;&lt;br /&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;br /&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; catch (Exception ex) &lt;br /&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;br /&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; status = false;&lt;br /&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;br /&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;br /&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;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; status = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&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; &lt;br /&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; reqFTP = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return status;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Above mentioned code will upload your file into FTP server. If file exists it will override that file.&lt;br /&gt;
&lt;br /&gt;
Happy learning.....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/5061004777546697041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/upload-file-into-ftp-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5061004777546697041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5061004777546697041'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/upload-file-into-ftp-server.html' title='Upload file into FTP server'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-7975875430057388626</id><published>2015-04-08T15:48:00.000+05:30</published><updated>2015-04-08T15:53:12.309+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Download file from FTP </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Add 2 reference in your class:&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt; System.Net;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;using&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt; System.IO;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;Then copy&amp;nbsp;below mentioned method&lt;/span&gt;&lt;br /&gt;
public static bool DownloadFile(string userId, string password, string ftpServerPath, string fileName, string localPath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FtpWebRequest reqFTP;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool status = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; String downloadUrl = String.Format(&quot;{0}{1}/{2}&quot;, @&quot;ftp:&quot;, ftpServerPath,fileName);&lt;br /&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; reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(downloadUrl));&lt;br /&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; reqFTP.UseBinary = true;&lt;br /&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; reqFTP.Credentials = new NetworkCredential(userId, password);&lt;br /&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; reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;&lt;br /&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; reqFTP.Proxy = null;&lt;br /&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; reqFTP.KeepAlive = false;&lt;br /&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; using (WebResponse response = reqFTP.GetResponse())&lt;br /&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;br /&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; using (Stream downloadStream = response.GetResponseStream())//;//read the download file from his stream&lt;br /&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;br /&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; using (FileStream fs = File.Create(localPath + @&quot;\&quot; + fileName))&lt;br /&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;br /&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; byte[] buffer = new byte[2048];&lt;br /&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; int read = 0;&lt;br /&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; do&lt;br /&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;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; read = downloadStream.Read(buffer, 0, buffer.Length);&lt;br /&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs.Write(buffer, 0, read);&lt;br /&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;br /&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; while (read != 0);&lt;br /&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; status = true;&lt;br /&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;br /&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;br /&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception ex)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&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; status = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;br /&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; &lt;br /&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; reqFTP = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return status;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
Above mentioned method will download the desired file from FTP server to your local file system.&lt;br /&gt;
&lt;br /&gt;
Happy learning......&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/7975875430057388626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/download-file-from-ftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/7975875430057388626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/7975875430057388626'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2015/04/download-file-from-ftp.html' title='Download file from FTP '/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-5832214012771171073</id><published>2014-05-15T11:24:00.000+05:30</published><updated>2014-05-15T11:24:28.099+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Difference between Lamda expression and LINQ query</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Each style has their pros and cons. Query syntax is nicer when it comes to joins and it has the useful&amp;nbsp;&lt;a href=&quot;http://web.archive.org/web/20101105231052/http://spellcoder.com/blogs/bashmohandes/archive/2007/12/16/9212.aspx&quot; style=&quot;background-color: transparent; border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;let&lt;/a&gt;keyword that makes creating temporary variables inside a query easy.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
Fluent syntax on the other hand has a lot more methods and operations that aren&#39;t exposed through the query syntax. Also since they are just extension methods you can write your own.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
I have found that every time I start writing a LINQ statement using the query syntax I end up having to put it in parenthesis and fall back to using fluent LINQ extension methods. Query syntax just doesn&#39;t have enough features to use by itself.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 17.804800033569336px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;&quot;&gt;
There are some LINQ extension methods which do not have counterparts in&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb397676.aspx&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;LINQ query expressions&lt;/a&gt;, and will require the use of Lambda Expressions. A good example is&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.linq.enumerable.tolookup.aspx&quot; rel=&quot;nofollow&quot; style=&quot;border: 0px; color: #4a6b82; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Enumerable.ToLookup&lt;/a&gt;&amp;nbsp;- if you want to create an ILookup, you need to use lambdas to generate this&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/5832214012771171073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/difference-between-lamda-expression-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5832214012771171073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5832214012771171073'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/difference-between-lamda-expression-and.html' title='Difference between Lamda expression and LINQ query'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-6337911213247422737</id><published>2014-05-13T15:00:00.001+05:30</published><updated>2014-05-13T15:00:20.990+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Programatically setting up Physical Path Credential on IIS server for a virtual directoty</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;Below mentioned function will do the same for you. But only thing you need to do add the reference of&amp;nbsp;Microsoft.Web.Administration dll on your project(7.0.0.0)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;private void SetPhysicalPathCredential(string virDirName)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!String.IsNullOrEmpty(physicalPathCredentialUserDomain) &amp;amp;&amp;amp; !String.IsNullOrEmpty(physicalPathCredentialUserUserName) &amp;amp;&amp;amp; !String.IsNullOrEmpty(physicalPathCredentialUserPassword))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (ServerManager manager = new ServerManager())&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; Site defaultSite = manager.Sites[&quot;Default Web Site&quot;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; // Read the data back from the updated configuration system,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; // then modify the Physical Path credential.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; Application apps = manager.Sites[&quot;Default Web Site&quot;].Applications[&quot;/&quot; + virDirName];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; VirtualDirectory appDir = apps.VirtualDirectories[0];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; LogMessage(&quot;Setting up Physical Path Credential: &quot; + virDirName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; appDir[&quot;userName&quot;] = physicalPathCredentialUserDomain + &quot;\\&quot; + physicalPathCredentialUserUserName;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; appDir[&quot;password&quot;] = physicalPathCredentialUserPassword;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; LogMessage(&quot;Successfully set up Physical Path Credential&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, 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; &amp;nbsp; manager.CommitChanges();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LogMessage(&quot;ERROR: Error Setting up Physical Path Credential &quot; + virDirName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw e;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/6337911213247422737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/programatically-setting-up-physical.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6337911213247422737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6337911213247422737'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/programatically-setting-up-physical.html' title='Programatically setting up Physical Path Credential on IIS server for a virtual directoty'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-4048747698916381496</id><published>2014-05-13T14:54:00.000+05:30</published><updated>2014-05-13T14:54:11.422+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Wix installer"/><title type='text'>Windows Installer error like while running light.exe from WiX</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Unregister vbscript.dll and jscript.dll from HKEY_CURRENT_USER to resolve this error:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;1. Click on the Start menu, choose Run, type cmd and click OK&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;2. To unregister the VBScript engine, run this command: &amp;nbsp;reg delete &quot;HKCU\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}&quot; /f&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;3. To unregister the VBScript engine on a 64-bit OS, run this command: &amp;nbsp;reg delete &quot;HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}&quot; /f&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;4. To unregister the JScript engine, run this command: reg delete &quot;HKCU\SOFTWARE\Classes\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}&quot; /f&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: #eeeeee; line-height: 18.165599822998047px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;5. To unregister the JScript engine on a 64-bit OS, run this command: reg delete &quot;HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}&quot; /f&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;So here you just need to do depending your OS version(32bit/64bit) you need to run the appropriate command.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Once I did that, my build started working as expected. &amp;nbsp;I still do not know how this information ended up in HKEY_CURRENT_USER on my system, particularly because the same build worked correctly on the same machine a couple of days ago. &amp;nbsp;However, I am now back into a state where I can build successfully, and I know of a possible workaround to try if I end up with similar build issues in the future.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Hope this information will everyone who face this issue...... :)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;line-height: 18.165599822998047px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Happy learning.......................................&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/4048747698916381496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/windows-installer-error-like-while.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4048747698916381496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4048747698916381496'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2014/05/windows-installer-error-like-while.html' title='Windows Installer error like while running light.exe from WiX'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-8797465354288049633</id><published>2013-09-03T14:17:00.000+05:30</published><updated>2013-09-03T14:17:25.926+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Remove cache in asp.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
The following code will remove all keys from the cache:&lt;/div&gt;
&lt;div&gt;
public void ClearApplicationCache(){&lt;/div&gt;
&amp;nbsp; &amp;nbsp; List&amp;lt;string&amp;gt; keys = new List&amp;lt;string&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // retrieve application Cache enumerator&lt;br /&gt;
&amp;nbsp; &amp;nbsp; IDictionaryEnumerator enumerator = Cache.GetEnumerator();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // copy all keys that currently exist in Cache&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while (enumerator.MoveNext()){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; keys.Add(enumerator.Key.ToString());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // delete every key from cache&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; keys.Count; i++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cache.Remove(keys[i]);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Modifying the second loop to check the value of the key before removing it should be trivial.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; clear: both; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;
Hope this helps.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/8797465354288049633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2013/09/remove-cache-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8797465354288049633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8797465354288049633'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2013/09/remove-cache-in-aspnet.html' title='Remove cache in asp.net'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-6807580925130232089</id><published>2013-07-31T23:07:00.000+05:30</published><updated>2013-08-01T00:50:13.475+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Asp.net Show Message box after saving the data into db server(sql)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
I have a common class and one of my method is this one&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin-bottom: 10px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;using System.Web;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;using System.Text;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;using System.Web.UI;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;/// &amp;lt;summary&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;/// A JavaScript alert&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;/// &amp;lt;/summary&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;public static class ShowAlertMessage&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; /// Shows a client-side JavaScript alert in the browser.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; /// &amp;lt;param name=&quot;message&quot;&amp;gt;The message to appear in the alert.&amp;lt;/param&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void Show(string message,string pageurl)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Cleans the message to allow single quotation marks&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string cleanMessage = message.Replace(&quot;&#39;&quot;, &quot;\\&#39;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string script = &quot;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;alert(&#39;&quot; + cleanMessage + &quot;&#39;);window.location=&#39;&quot; + pageurl + &quot;&#39;&amp;lt;/script&amp;gt;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Gets the executing web page&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Page page = HttpContext.Current.CurrentHandler as Page;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Checks if the handler is a Page and that the script isn&#39;t allready on the Page&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (page != null &amp;amp;&amp;amp; !page.ClientScript.IsClientScriptBlockRegistered(&quot;alert&quot;))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; page.ClientScript.RegisterClientScriptBlock(typeof(ShowAlertMessage), &quot;alert&quot;, script);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void Show(string message)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Cleans the message to allow single quotation marks&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string cleanMessage = message.Replace(&quot;&#39;&quot;, &quot;\\&#39;&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string script = &quot;&amp;lt;script type=\&quot;text/javascript\&quot;&amp;gt;alert(&#39;&quot; + cleanMessage + &quot;&#39;);&amp;lt;/script&amp;gt;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Gets the executing web page&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Page page = HttpContext.Current.CurrentHandler as Page;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Checks if the handler is a Page and that the script isn&#39;t allready on the Page&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (page != null &amp;amp;&amp;amp; !page.ClientScript.IsClientScriptBlockRegistered(&quot;alert&quot;))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; page.ClientScript.RegisterClientScriptBlock(typeof(ShowAlertMessage), &quot;alert&quot;, script);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
then any time i want to display a message i just call that method from page like this.&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin-bottom: 10px; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;ShowAlertMessage.Show&lt;/span&gt;&lt;span style=&quot;color: #434343; font-family: helvetica, arial, verdana, ms sans serif, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 22px;&quot;&gt;(&quot;Data has been saved!&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
hope that help.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #434343; font-family: helvetica, arial, verdana, &#39;ms sans serif&#39;, sans-serif; font-size: 14px; line-height: 22px; margin-bottom: 10px; padding: 0px;&quot;&gt;
Happy learning :)&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/6807580925130232089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2013/07/aspnet-show-message-box-after-saving.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6807580925130232089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6807580925130232089'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2013/07/aspnet-show-message-box-after-saving.html' title='Asp.net Show Message box after saving the data into db server(sql)'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-7727182700989413675</id><published>2013-06-17T22:56:00.001+05:30</published><updated>2013-06-17T22:57:15.493+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Printing pyramid like stars using C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(Enumerable.Range(1, 7).Aggregate(new StringBuilder(), (sb, i) =&amp;gt; sb.AppendLine(new string(&#39;*&#39;, 7 - 2 * Math.Abs(i - 4)).PadLeft(7 - Math.Abs(i - 4)))));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;}&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&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/AVvXsEgNHciqxofMhr2SeEbajaOb2JZ6pndisqkY_l3g4wd_c8gl5y7GKkulBodJNRh_wEoi9ZFJwBX-tZiL0kmVKAag0ybZo589PE0I4SIMg7RnkPEXZ-a6olVFmhYUPEuDhngpv-MBC4kXljE/s1600/Stars.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHciqxofMhr2SeEbajaOb2JZ6pndisqkY_l3g4wd_c8gl5y7GKkulBodJNRh_wEoi9ZFJwBX-tZiL0kmVKAag0ybZo589PE0I4SIMg7RnkPEXZ-a6olVFmhYUPEuDhngpv-MBC4kXljE/s320/Stars.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/7727182700989413675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2013/06/printing-pyramid-like-stars-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/7727182700989413675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/7727182700989413675'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2013/06/printing-pyramid-like-stars-using-c.html' title='Printing pyramid like stars using C#'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNHciqxofMhr2SeEbajaOb2JZ6pndisqkY_l3g4wd_c8gl5y7GKkulBodJNRh_wEoi9ZFJwBX-tZiL0kmVKAag0ybZo589PE0I4SIMg7RnkPEXZ-a6olVFmhYUPEuDhngpv-MBC4kXljE/s72-c/Stars.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-5777948553087518948</id><published>2013-04-24T15:51:00.001+05:30</published><updated>2013-04-24T15:52:04.023+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Use getElementById in Javascript to iterate through table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
var SelectedRowsCount = new Array();&lt;br /&gt;
var AllRowsCount = new Array();&lt;br /&gt;
var HeaderCheckBox = new Array();&lt;br /&gt;
&lt;br /&gt;
function CountCheckedRowsByCol(detailTableName, colNum)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AllRowsCount[colNum] = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectedRowsCount[colNum] = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var detailTable = document.getElementById(detailTableName);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (detailTable == null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var Rows = detailTable.getElementsByTagName(&quot;tr&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (colNum == null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colNum = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; Rows.length; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cols = Rows[i].getElementsByTagName(&quot;td&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cols.length &amp;lt;= colNum)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var chks = cols[colNum].getElementsByTagName(&quot;input&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (chks.length == 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (chks[0].type != &quot;checkbox&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (AllRowsCount[colNum] == 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (HeaderCheckBox[colNum] == null)&lt;br /&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; HeaderCheckBox[colNum] = chks[0];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (chks[0].checked)&lt;br /&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; SelectedRowsCount[colNum]++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AllRowsCount[colNum]++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AllRowsCount[colNum]--;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
//&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(AllRowsCount[colNum]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //CheckHeaderIfAllColChkBoxSelected(colNum);&lt;br /&gt;
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/5777948553087518948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2013/04/use-getelementbyid-in-javascript-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5777948553087518948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5777948553087518948'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2013/04/use-getelementbyid-in-javascript-to.html' title='Use getElementById in Javascript to iterate through table'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-2761646841362277229</id><published>2013-02-28T14:40:00.002+05:30</published><updated>2013-02-28T14:41:21.945+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Getting Access Denied error when using XMLHttpRequest in javascript on IE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This error could happen due to cross domain issue, use relative path  in Server Url if using absolute, also you may try changing Internet  Explorer Trusted Site Zones settings (Internet Explorer  Options-&amp;gt;Security-&amp;gt; Trusted Sites (if your Url added into  Trusted Sites, if added into Local intranet then choose Local  Intranet)&amp;nbsp;-&amp;gt; Custom Level) , scroll down and change &lt;b&gt;Access data sources across domains&lt;/b&gt; value to &lt;b&gt;Enable&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If the above does not solve problem then you may deploy clientaccesspolicy and crossdomainpolict xml to resolve the issue:&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/cc197955%28v=vs.95%29.aspx&quot; rel=&quot;nofollow&quot;&gt;&lt;span style=&quot;color: #0033cc;&quot;&gt;http://msdn.microsoft.com/en-us/library/cc197955(v=vs.95).aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;&quot; src=&quot;http://social.microsoft.com/Forums/getfile/15861/&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Happy Learning.....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/2761646841362277229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2013/02/getting-access-denied-error-when-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2761646841362277229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2761646841362277229'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2013/02/getting-access-denied-error-when-using.html' title='Getting Access Denied error when using XMLHttpRequest in javascript on IE'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-5863726927655722887</id><published>2012-11-27T15:37:00.001+05:30</published><updated>2012-11-27T15:38:11.889+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>window.showModalDialog Page Load not being executed everytime</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;Problem : &lt;/b&gt;Loading a page as a modal dialog box as window.showModalDialog(&quot;myurl.aspx&quot;). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the Page_Load(). Instead the page pops up with the previous values in all its controls. What we want is &lt;/span&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;the Page_Load() to be triggered every time the modal dialog pops up.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;Solution: &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;First of all showModalDialog is an proprietary IE only feature its not supported by &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;all browsers&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;Solution 1 : &lt;/b&gt;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;You need to add a unique query string value to the URL that you are using to avoid IE showing the cached version. So generate a random number and append it to the URL e.g myurl.aspx?rnd=12237827348273. This should bust the cache and make a fresh request&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;Solution 2 : &lt;/b&gt;Turn caching of on the page by using &lt;span style=&quot;background-color: #fafafa; display: inline ! important; float: none; font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;@OutputCache directive&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;background-color: #fafafa; display: inline ! important; float: none; font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&amp;lt;%@ OutputCache Duration=&quot;1&quot; Location=&quot;None&quot; VaryByParam=&quot;none&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, &#39;Liberation Sans&#39;, &#39;DejaVu Sans&#39;, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;span style=&quot;background-color: #fafafa; display: inline ! important; float: none; font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;&lt;b&gt;Solution 3 :&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;&quot;&gt;C&lt;/span&gt;&lt;span style=&quot;background-color: #fafafa; display: inline ! important; float: none; font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;all----- Response.Cache.SetCacheability(HttpCacheability.NoCache);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; display: inline ! important; float: none; font-family: Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;Hope that will help you. Happy Learning...... :)&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/5863726927655722887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/11/windowshowmodaldialog-page-load-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5863726927655722887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5863726927655722887'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/11/windowshowmodaldialog-page-load-not.html' title='window.showModalDialog Page Load not being executed everytime'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-4751391487790588335</id><published>2012-11-26T10:59:00.001+05:30</published><updated>2012-11-26T10:59:46.813+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Dropdown list binding with financial year</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Problem: &lt;/b&gt;Sometimes we need to get a result of financial years(...2011-2012, 2012-2013, 
2013-2014) starting from the date given by me to till 5 year in a 
dropdown list.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution: &lt;/b&gt;Lets say we received the given date from text box:-&lt;br /&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;margin-top: 0px;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;margin-top: 0px;&quot;&gt;DateTime GivenDate = Convert.ToDateTime(textBox1.Text);
&lt;span class=&quot;code-keyword&quot;&gt;int&lt;/span&gt; GivenYear = GivenDate.Year;
&amp;nbsp;
&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;code-keyword&quot;&gt;int&lt;/span&gt; i=0; i&amp;lt;&lt;span class=&quot;code-digit&quot;&gt;5&lt;/span&gt;; i++)
{
comboBox1.Items.Add(GivenYear + i + &lt;span class=&quot;code-string&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot;&gt;-&quot;&lt;/span&gt; + (GivenYear + &lt;span class=&quot;code-digit&quot;&gt;1&lt;/span&gt; + i));
}&lt;/pre&gt;
&lt;br /&gt;
Hope this will solve your problem..... &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/4751391487790588335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/11/dropdown-list-binding-with-financial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4751391487790588335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/4751391487790588335'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/11/dropdown-list-binding-with-financial.html' title='Dropdown list binding with financial year'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-5790919125939881274</id><published>2012-10-18T10:18:00.003+05:30</published><updated>2012-10-18T10:22:22.901+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>&#39;Operation is not valid due to the current state of the object&#39; error during postback</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Whenever a postback is done, this error occurs when form fields are very large in number. The stack trace is:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;display: block;&quot; width=&quot;100%&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span id=&quot;precollapse0&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;a href=&quot;http://www.codeproject.com/Tips/333633/Error-Operation-is-not-valid-due-to-the-current-st#&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;text&quot; style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded() at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding) at System.Web.HttpRequest.FillInFormCollection()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;By default, the maximum value of &lt;code&gt;MaxHttpCollection&lt;/code&gt; is 1000.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;To solve this error, increase the &lt;code&gt;MaxHttpCollection&lt;/code&gt; value. Try adding the following setting in your &lt;i&gt;web.config&lt;/i&gt;&#39;s &lt;code&gt;&amp;lt;appsettings&amp;gt;&lt;/code&gt; block.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;display: block;&quot; width=&quot;100%&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.codeproject.com/Tips/333633/Error-Operation-is-not-valid-due-to-the-current-st#&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre id=&quot;pre1&quot; lang=&quot;xml&quot; style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;code-leadattribute&quot;&gt;appSettings&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;code-keyword&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;code-leadattribute&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;code-attribute&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;=&quot;&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;aspnet:MaxHttpCollectionKeys&quot;&lt;/span&gt; &lt;span class=&quot;code-attribute&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;=&quot;&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;2001&quot;&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;code-keyword&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;code-leadattribute&quot;&gt;appSettings&lt;/span&gt;&lt;span class=&quot;code-keyword&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre id=&quot;pre1&quot; lang=&quot;xml&quot; style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;It can solve your problem. If you have very large records on your  page, say 600 records in a grid, and you click on Submit, then increase  the value of &lt;code&gt;MaxHttpCollection&lt;/code&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt; Then change value 2000 to 5000 and test again. It will be resolved.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div itemprop=&quot;name&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;Question : &lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Specifying MaxHttpCollectionKeys for a specific page - is this possible?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div itemprop=&quot;name&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-text&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;No, that&#39;s not possible. It always checks the appSetting &lt;code&gt;aspnet:MaxHttpCollectionKeys&lt;/code&gt;  and if that is missing it will be set to 1000. You cannot override this  because the reading of the setting and the default value is done inside  an internal class.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Perhaps a better approach would be to build a form with less than  1000 items. Maybe in the form of a wizard. Or maybe by combining  multiple values into a single data structure and deserializing it on the  server.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/8684049/asp-net-ms11-100-how-can-i-change-the-limit-on-the-maximum-number-of-posted-for&quot;&gt;for more info please visit the link&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Happy &lt;span style=&quot;font-size: small;&quot;&gt;learning....... :)&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div itemprop=&quot;name&quot; style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/5790919125939881274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/operation-is-not-valid-due-to-current.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5790919125939881274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/5790919125939881274'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/operation-is-not-valid-due-to-current.html' title='&#39;Operation is not valid due to the current state of the object&#39; error during postback'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-8407288145222404971</id><published>2012-10-16T10:24:00.000+05:30</published><updated>2012-10-16T10:24:47.676+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Remove Duplicate Rows from a Table in SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;--Create Table Script&lt;br /&gt;
CREATE TABLE [dbo].[ATTENDANCE](&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [AUTOID] INT IDENTITY(1,1),&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [EMPLOYEE_ID] [varchar](50) NOT NULL,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [ATTENDANCE_DATE] [date] NOT NULL&lt;br /&gt;
) ON [PRIMARY]&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
--Insert the into the newly created table&lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A001&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A001&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A002&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A002&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A002&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
INSERT INTO dbo.ATTENDANCE (EMPLOYEE_ID,ATTENDANCE_DATE)VALUES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; (&#39;A003&#39;,CONVERT(DATETIME,&#39;01-01-11&#39;,5)) &lt;br /&gt;
&lt;br /&gt;
--Check the data from the table &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
SELECT * FROM dbo.ATTENDANCE&lt;br /&gt;
&lt;br /&gt;
--Check the duplicate data&lt;br /&gt;
SELECT * FROM dbo.ATTENDANCE WHERE AUTOID NOT IN (SELECT MIN(AUTOID)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM dbo.ATTENDANCE GROUP BY EMPLOYEE_ID,ATTENDANCE_DATE)&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
--Delete the duplicate data&lt;br /&gt;
DELETE FROM dbo.ATTENDANCE WHERE AUTOID NOT IN (SELECT MIN(AUTOID) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM dbo.ATTENDANCE GROUP BY EMPLOYEE_ID,ATTENDANCE_DATE) &lt;br /&gt;
&lt;br /&gt;
--Alternatively you can use the below query as well&lt;br /&gt;
DELETE FROM dbo.ATTENDANCE WHERE AUTOID NOT IN (SELECT MAX(AUTOID)&lt;br /&gt;
FROM dbo.ATTENDANCE GROUP BY EMPLOYEE_ID,ATTENDANCE_DATE)&lt;br /&gt;
&lt;br /&gt;
--After deleting the duplicate data check data from the table&lt;br /&gt;
SELECT * FROM dbo.ATTENDANCE&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;So in general use the below Query-&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;code&gt;DELETE&lt;br /&gt;
FROM MyTable&lt;br /&gt;
WHERE ID NOT IN&lt;br /&gt;
(&lt;br /&gt;
SELECT    MAX(ID)&lt;br /&gt;
FROM MyTable&lt;br /&gt;
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;code&gt;Table in example is has ID as Identity Column and Columns which have  duplicate data are DuplicateColumn1, DuplicateColumn2 and  DuplicateColumn3.&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;code&gt;Happy learning..... :)&amp;nbsp;&lt;/code&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/8407288145222404971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/remove-duplicate-rows-from-table-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8407288145222404971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8407288145222404971'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/remove-duplicate-rows-from-table-in-sql.html' title='Remove Duplicate Rows from a Table in SQL Server'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-1689546886282930359</id><published>2012-10-09T18:13:00.000+05:30</published><updated>2012-10-09T18:13:43.545+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><title type='text'>WCF - The type name ServiceReference1 does not exist in the type Namespace.ClassName</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This is a short blog post about a strange error when adding a WCF 
service reference. A WCF service was created and I wanted to add a 
service reference to a client project. I added the reference through 
Visual Studio and everything went fine until I compiled. Then I got this
 error:&lt;br /&gt;
&lt;br /&gt;
Error&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp; The type name &#39;ServiceReference1&#39; does not exist in the type &#39;FeedbackCustomControl.FeedbackCustomControl&#39;&amp;nbsp;&amp;nbsp;&amp;nbsp; D:\RND\ExcelApplication\FeedbackCustomControl\Service References\ServiceReference1\Reference.cs&amp;nbsp;&amp;nbsp;&amp;nbsp; 146&amp;nbsp;&amp;nbsp;&amp;nbsp; 46&amp;nbsp;&amp;nbsp;&amp;nbsp; FeedbackCustomControl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found that this is caused by me having the same namespace name as 
class name (FeedbackCustomControl.FeedbackCustomControl = Namespace.ClassName). Change your 
namespace to a name that is not the same name as your class and this 
will compile.&lt;br /&gt;
&lt;br /&gt;
Happy Learning..... :) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/1689546886282930359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/wcf-type-name-servicereference1-does.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/1689546886282930359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/1689546886282930359'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/10/wcf-type-name-servicereference1-does.html' title='WCF - The type name ServiceReference1 does not exist in the type Namespace.ClassName'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-2311260329128380505</id><published>2012-09-05T18:41:00.000+05:30</published><updated>2012-09-05T18:42:08.911+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>The shortest, fastest, and easiest way to compare two tables in SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
When you have two tables (or resultsets from SELECT statements) that you wish 
to compare, and you want to see any changes in ANY columns, as well as to see 
which rows exist in 1 table but not the other (in either direction) I have found 
that the UNION operator works quite well.&lt;br /&gt;
UNION allows you to compare all columns very quickly, and also handles 
comparing NULL values to other NULLs successfully, which a join clause or a 
WHERE condition doesn&#39;t normally do.&amp;nbsp; It also allows you to very quickly see 
which rows are missing in either table, which only a FULL OUTER JOIN will do, 
but of course we all know to avoid those at all costs (right?) -- a full outer 
join is about as “unrelational” as you can get.&amp;nbsp; (every column returned is 
potentially Null and must be wrapped in a COALESCE function).&amp;nbsp; Best of all, the 
UNION is quick and easy and short.&lt;br /&gt;
The basic idea is: if we GROUP the union of two&amp;nbsp;tables on all columns, then 
if the two tables are identical all groups will result in a COUNT(*) of 2.&amp;nbsp; But 
for any rows that are not completely matched on any column in the GROUP BY 
clause, the COUNT(*) will be 1 -- and those are the ones we want.&amp;nbsp; We also need 
to add a column to each part of the UNION to indicate which table each row comes 
from, otherwise there is no way to distinguish between which row comes from 
which table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CREATE PROCEDURE CompareTables(@table1 varchar(100), &lt;br /&gt;
&amp;nbsp;@table2 Varchar(100), @T1ColumnList varchar(1000),&lt;br /&gt;
&amp;nbsp;@T2ColumnList varchar(1000) = &#39;&#39;)&lt;br /&gt;
AS&lt;br /&gt;
declare @SQL varchar(8000);&lt;br /&gt;
&lt;br /&gt;
IF @t2ColumnList = &#39;&#39; SET @T2ColumnList = @T1ColumnList&lt;br /&gt;
&lt;br /&gt;
set @SQL = &#39;SELECT &#39;&#39;&#39; + @table1 + &#39;&#39;&#39; AS TableName, &#39; + @t1ColumnList +&lt;br /&gt;
&amp;nbsp;&#39; FROM &#39; + @Table1 + &#39; UNION ALL SELECT &#39;&#39;&#39; + @table2 + &#39;&#39;&#39; As TableName, &#39; +&lt;br /&gt;
&amp;nbsp;@t2ColumnList + &#39; FROM &#39; + @Table2&lt;br /&gt;
&lt;br /&gt;
set @SQL = &#39;SELECT Max(TableName) as TableName, &#39; + @t1ColumnList +&lt;br /&gt;
&amp;nbsp;&#39; FROM (&#39; + @SQL + &#39;) A GROUP BY &#39; + @t1ColumnList + &lt;br /&gt;
&amp;nbsp;&#39; HAVING COUNT(*) = 1&#39;&lt;br /&gt;
&lt;br /&gt;
exec ( @SQL)&lt;br /&gt;
&lt;br /&gt;
Parameter definition:&lt;br /&gt;
&lt;br /&gt;
-- Table1, Table2 are the tables or views to compare.&lt;br /&gt;
-- T1ColumnList is the list of columns to compare, from table1.&lt;br /&gt;
-- Just list them comma-separated, like in a GROUP BY clause.&lt;br /&gt;
-- If T2ColumnList is not specified, it is assumed to be the same&lt;br /&gt;
-- as T1ColumnList.&amp;nbsp; Otherwise, list the columns of Table2 in&lt;br /&gt;
-- the same order as the columns in table1 that you wish to compare.&lt;br /&gt;
--&lt;br /&gt;
-- The result is all rows from either table that do NOT match&lt;br /&gt;
-- the other table in all columns specified, along with which table that row is from.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy learning......&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/2311260329128380505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/09/the-shortest-fastest-and-easiest-way-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2311260329128380505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2311260329128380505'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/09/the-shortest-fastest-and-easiest-way-to.html' title='The shortest, fastest, and easiest way to compare two tables in SQL Server'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-2253647812762610068</id><published>2012-08-07T14:22:00.000+05:30</published><updated>2012-08-07T14:22:16.149+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Nested user controls and javascript getElementById</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is the code to find control in&amp;nbsp;WebUserControl which nested in your aspx page. &lt;br /&gt;
Suppose the&amp;nbsp;popup.ascx&#39;s ID is &lt;b&gt;popupControl&lt;/b&gt; and the locations.ascx&#39;s ID is &lt;b&gt;locationControl&lt;/b&gt;&lt;br /&gt;
To find &quot;&lt;span class=&quot;str&quot;&gt;drpLocationList&lt;/span&gt;&quot; which&amp;nbsp;in&lt;span class=&quot;pln&quot;&gt; location&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;ascx&lt;/span&gt; we can use the below mentioned code:&lt;br /&gt;
&lt;br /&gt;
var ddlLocation = document.getElementById(&#39;&amp;lt;%=popupControl.FindControl(&quot;locationControl&quot;).FindControl(&quot;drpLocationList&quot;).ClientID%&amp;gt;&#39;);&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/2253647812762610068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/08/nested-user-controls-and-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2253647812762610068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2253647812762610068'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/08/nested-user-controls-and-javascript.html' title='Nested user controls and javascript getElementById'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-8869335854119544518</id><published>2012-08-07T13:06:00.000+05:30</published><updated>2012-08-07T13:07:05.425+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><title type='text'>Disable History on Textbox</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;For Framework version 2.0 and above:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;              Set the AutoCompleteType property to Disabled for the textbox.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;AutoCompleteType=&quot;Disabled&quot; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;For other framework version :&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;TextBox1.Attributes.Add(&quot;autocomplete&quot;, &quot;off&quot;)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/8869335854119544518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/08/disable-history-on-textbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8869335854119544518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8869335854119544518'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/08/disable-history-on-textbox.html' title='Disable History on Textbox'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-2286370537139826809</id><published>2012-06-27T03:24:00.000+05:30</published><updated>2012-06-27T03:24:04.822+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Printing the content of div or panel</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In general, we required to print the content of a portion of page. We  don&#39;t need that whole page will get printed. So here I am going to  provide a small java script function that can solve this problem.&lt;br /&gt;
Here is the code for print a specific area.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;&quot; title=&quot;code&quot;&gt;function PrintDiv() {    
var prtContent = document.getElementById(&#39;&amp;lt;%=divPrintArea.ClientID%&amp;gt;&#39;);   
var WinPrint = window.open(&#39;&#39;, &#39;&#39;, &#39;left=0,top=0,width=900,height=600,&lt;/pre&gt;
&lt;pre class=&quot;brush: csharp;&quot; title=&quot;code&quot;&gt;toolbar=1,scrollbars=1,status=0&#39;);    
WinPrint.document.write(prtContent.innerHTML);    
WinPrint.document.close();   
WinPrint.focus();   
WinPrint.print();   
WinPrint.close();    
}&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/2286370537139826809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/printing-content-of-div-or-panel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2286370537139826809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/2286370537139826809'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/printing-content-of-div-or-panel.html' title='Printing the content of div or panel'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-8066324766887854433</id><published>2012-06-27T02:53:00.000+05:30</published><updated>2012-06-27T03:24:25.307+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Javascript function to check integer value</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre class=&quot;brush: jscript;&quot; title=&quot;code&quot;&gt;function isInteger(s) {
    var i;
    for (i = 0; i &amp;lt; s.length; i++) {
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c &amp;lt; &quot;0&quot;) || (c &amp;gt; &quot;9&quot;))) return false;
    }
    // All characters are numbers.
    return true;
}&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/8066324766887854433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/javascript-function-to-check-integer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8066324766887854433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/8066324766887854433'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/javascript-function-to-check-integer.html' title='Javascript function to check integer value'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9145097767317001746.post-6567218229375867779</id><published>2012-06-27T02:45:00.001+05:30</published><updated>2012-06-27T03:24:43.401+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Making a button default clickable when enter key is pressed</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Many times we want that on pressing 
enter key the submit button should be automatic click. For example on 
login page after typing password generally users press enter key and 
want that submit button will call but nothing happen.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;Here is the JavaScript code for it: &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; margin: 0cm 0cm 10pt;&quot;&gt;
&lt;pre class=&quot;brush: jscript;&quot; title=&quot;code&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;

function doClick(buttonName, e) {
            var key;
            if (window.event)
                        key = window.event.keyCode;     //IE
            else
                        key = e.which;     //firefox
            if (key == 13) {   //Get the button the user wants to have clicked
                        var btn = document.getElementById(buttonName);
                        if (btn != null) { //If we find the button click it
                                    btn.click();
                                    event.keyCode = 0
                        }
            }
}&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashiskrdas.blogspot.com/feeds/6567218229375867779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/making-button-default-clickable-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6567218229375867779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9145097767317001746/posts/default/6567218229375867779'/><link rel='alternate' type='text/html' href='http://ashiskrdas.blogspot.com/2012/06/making-button-default-clickable-when.html' title='Making a button default clickable when enter key is pressed'/><author><name>Ashis Kumar Das</name><uri>http://www.blogger.com/profile/16290792677021447035</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT5YJOgwH7qf8hiclFpOhKchU0CY03MLrB2PSF0iNUmzq5ADm-Rr2NFhZLCnp3J7K0DyOG085Sqr1yHDWO0JG5oc2rIBDr9FUpO-AIcISc8lQIWx084FeznSWyV9jYD3o/s220/DSC00168.JPG'/></author><thr:total>0</thr:total></entry></feed>