<?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-8942547654388455253</id><updated>2024-12-19T08:48:15.970+05:30</updated><category term="Interview"/><category term="pdfs"/><category term="Text to word"/><category term="javascript"/><category term="pdf"/><category term="Asp.net"/><category term="3-tire application"/><category term="Top 15 IT Certifications for 2012"/><category term="hr"/><category term="wcf"/><title type='text'>Interview Funda</title><subtitle type='html'>frequently asked interview questions for freshers and experienced</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-2701227353798958321</id><published>2012-11-12T19:53:00.000+05:30</published><updated>2014-09-13T19:21:41.383+05:30</updated><title type='text'>what is Ajax</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: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;ASP.NET AJAX, mostly called AJAX, is
a set of extensions of ASP.NET. It is developed by Microsoft to implement AJAX
functionalities in Web applications. ASP.NET AJAX provides a set of components
that enable the developers to develop applications that can update only a
specified portion of data without refreshing the entire page.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; The ASP.NET AJAX
works with the AJAX Library that uses object-oriented programming (OOP) to
develop rich Web applications that communicate with the server using
asynchronous postback&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/2701227353798958321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/11/ajax1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2701227353798958321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2701227353798958321'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/11/ajax1.html' title='what is Ajax'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-1792010910970719543</id><published>2012-08-17T00:07:00.000+05:30</published><updated>2012-08-17T00:37:47.163+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="3-tire application"/><title type='text'>3 Tier Architecture using ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
3-Tier architecture is one of the most&amp;nbsp;popular approaches in software development.&lt;br /&gt;
&lt;br /&gt;
&lt;a alt=&quot;1.jpg&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFUWbo982hixBhEwYMe80T3rVXNpLP6Y_I0yPxzo4GeivFSM2_yE17KpVhc4fDh57WQkbT-V7jRg91-oB6EKRyCTIlqXw8-mG5dOrBY8xO7pd91-_WSB3s3NYAQnWIhUtjU_iE0DV82bM_/s1600/1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFUWbo982hixBhEwYMe80T3rVXNpLP6Y_I0yPxzo4GeivFSM2_yE17KpVhc4fDh57WQkbT-V7jRg91-oB6EKRyCTIlqXw8-mG5dOrBY8xO7pd91-_WSB3s3NYAQnWIhUtjU_iE0DV82bM_/s320/1.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;b&gt;Tier Vs Layer &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tier&lt;/b&gt; indicates a physical separation of components. &lt;br /&gt;
&lt;br /&gt;
Here separate assemblies/services are made to represent each component.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Layer&lt;/b&gt; indicates a logical separation of components with the help of namespaces and classes&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Components of 3-Layer Architecture&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Presentation Tier: in simple terms, the UI with which the end user actually interacts.&lt;/li&gt;
&lt;li&gt;Data Tier: Where actual data is stored.&lt;/li&gt;
&lt;li&gt;Business
 Tier: It acts a bridge between Data Tier and the Presentation Tier. It 
collects raw data from the Presentation Tier, checks for validations, 
converts them to a standard format and finally sends them to the Data 
Tier. Similarly it collects data from the Data Tier, purifies it and 
sends it to the Presentation Tier for display.&lt;/li&gt;
&lt;li&gt;Business Objects: Its nothing but a class representation of actual data.&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;How it Looks&lt;/b&gt;&lt;br /&gt;
&lt;a alt=&quot;3.JPG&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn_s_PqoCLg2ojc4Prt2okbQkzxNj7JWjAtuA3LTCy-Hyukjwu2A5SB0j2CAQXM9aTrsLRtRz7zr3ZrGsqHnmUtwK0_8xiM480txqWAhHAGzkBMRWiLKTOLNUoDy28k8UqoUGkSrBdROrZ/s1600/2.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn_s_PqoCLg2ojc4Prt2okbQkzxNj7JWjAtuA3LTCy-Hyukjwu2A5SB0j2CAQXM9aTrsLRtRz7zr3ZrGsqHnmUtwK0_8xiM480txqWAhHAGzkBMRWiLKTOLNUoDy28k8UqoUGkSrBdROrZ/s320/2.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Code Walkthrough&lt;/b&gt;&lt;br /&gt;
What we are developing.&lt;br /&gt;
&lt;br /&gt;
We are developing a customer screen which supports 2 operations:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Add New Customer&lt;/li&gt;
&lt;li&gt;List All Customers.&lt;/li&gt;
&lt;/ol&gt;
Now customers may be of the types&lt;br /&gt;
&lt;br /&gt;
Gold, Silver or Normal which represents Id as 1, 2 and&amp;nbsp;3 respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note: &lt;/b&gt;In the database CustomerTypeId will be stored but in the grid the&amp;nbsp;descriptive text will be shown.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1: &lt;/b&gt;Create Business Objects required - we need 2 things,&lt;br /&gt;
one representing the customer type and anotehr representing the customer itself.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt; &lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; ClsCustomerType(&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; id)&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;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Id = id;&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;&lt;span style=&quot;color: blue;&quot;&gt;switch&lt;/span&gt;(Id)&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;{&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;&lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 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;&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;--Select--&quot;&lt;/span&gt;;&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;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&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;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 1:&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;span style=&quot;color: blue;&quot;&gt; this&lt;/span&gt;.Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Gold&quot;&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 2:&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;&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Silver&quot;&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;case&lt;/span&gt; 3:&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;&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Name = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Normal&quot;&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; Id&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;&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; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;;&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; Name&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomer&lt;/span&gt;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; CustomerCode&lt;br /&gt;
&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;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;&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; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;;&lt;br /&gt;
&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;span style=&quot;color: blue;&quot;&gt; public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; CustomerName&lt;br /&gt;
&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;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;&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; &lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;;&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt; CustomerType&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;get&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;set&lt;/span&gt;;&lt;br /&gt;
&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; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2:&lt;/b&gt; Create Business Access Layer&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerBAL&lt;/span&gt;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;&amp;gt; LoadCustomerTypes()&lt;br /&gt;
&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;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;List&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;&amp;gt;()&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;(0),&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;(1),&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;(2),&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerType&lt;/span&gt;(3)&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;IEnumerable&lt;/span&gt;&amp;lt;&lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomer&lt;/span&gt;&amp;gt; LoadCustomers()&lt;br /&gt;
&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;span style=&quot;color: #2b91af;&quot;&gt;DataTable&lt;/span&gt; dtCustomer=&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; C&lt;span style=&quot;color: #2b91af;&quot;&gt;lsCustomerDAL&lt;/span&gt;().LoadCustomers();&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;&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SaveRecord(&lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomer&lt;/span&gt; objCustomer)&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerDAL&lt;/span&gt;().SaveRecord(objCustomer);&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ValidationResult&lt;/span&gt; ValidateCustomerCode(&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; strPriCustomerCode)&lt;br /&gt;
&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;&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(strPriCustomerCode.Trim() == &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;.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;&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;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ValidationResult&lt;/span&gt;.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;&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;&lt;span style=&quot;color: blue;&quot;&gt; else&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt;(strPriCustomerCode.Trim().Length &amp;lt; 5)&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;{&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;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ValidationResult&lt;/span&gt;.InValid;&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; }&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;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ValidationResult&lt;/span&gt;.Valid;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3: &lt;/b&gt;&amp;nbsp;Next we need a Data Access Layer:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Data;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; System.Data.SqlClient;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; Entities;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;namespace&lt;/span&gt; DAL&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt; public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomerDAL&lt;/span&gt;&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;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; ConnectionString = &lt;span style=&quot;color: #a31515;&quot;&gt;@&quot;Data Source=ONENESS-PC\S2;Initial Catalog=3LayerApp;Persist&lt;br /&gt;Security Info=True;User ID=sa;Password=aa&quot;&lt;/span&gt;;&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;&lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DataTable&lt;/span&gt; LoadCustomers()&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;{&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;span style=&quot;color: green;&quot;&gt;//Load Data From Database&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&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;}&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; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SaveRecord(&lt;span style=&quot;color: #2b91af;&quot;&gt;ClsCustomer&lt;/span&gt; objCustomer)&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; {&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;span style=&quot;color: green;&quot;&gt;//Save Data Into Database&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&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;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 4: &lt;/b&gt;That&#39;s it; now the only thing remaining is creation of the UI:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVuB4_Q3sTXD4eqQT7SJ6KjY-wvWhlBy2tda-fDvivMEw_YSYC8rUol_P5IApFgWll5ukjB5yNQiB5I5W_1J2nnhwfcdEnuMtjTfymT47qQXUkE_lcTVzDD6kNRJUWYuKMFAfijmGsTEWM/s1600/3.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVuB4_Q3sTXD4eqQT7SJ6KjY-wvWhlBy2tda-fDvivMEw_YSYC8rUol_P5IApFgWll5ukjB5yNQiB5I5W_1J2nnhwfcdEnuMtjTfymT47qQXUkE_lcTVzDD6kNRJUWYuKMFAfijmGsTEWM/s320/3.gif&quot; style=&quot;cursor: move;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
In
 the UI the code behind we will just call the functions created on BAL, 
there will not be any database logic, and neither wll there be 
validation logic.&lt;br /&gt;
&lt;br /&gt;
Hope this explanation was enough to understand,
 how to create a simple 3-Layer application using ASP.Net also I hope 
you enjoyed reading this article.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/1792010910970719543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/3-tier-architecture-using-aspnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1792010910970719543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1792010910970719543'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/3-tier-architecture-using-aspnet.html' title='3 Tier Architecture using ASP.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFUWbo982hixBhEwYMe80T3rVXNpLP6Y_I0yPxzo4GeivFSM2_yE17KpVhc4fDh57WQkbT-V7jRg91-oB6EKRyCTIlqXw8-mG5dOrBY8xO7pd91-_WSB3s3NYAQnWIhUtjU_iE0DV82bM_/s72-c/1.gif" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-3671573281042980633</id><published>2012-08-14T22:21:00.000+05:30</published><updated>2012-08-14T22:21:22.865+05:30</updated><title type='text'></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;text-align: left;&quot;&gt;
&lt;blink style=&quot;color: red;&quot;&gt;&lt;b&gt;SBI Results&lt;/b&gt;&lt;/blink&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;blink style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/blink&gt;&lt;a href=&quot;https://www.sbi.co.in/user.htm?action=sbiclkresultaug&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;CLERICAL RECRUITMENT [ASSISTANTS &amp;amp; STENOGRAPHERS] IN STATE BANK OF INDIA&lt;br /&gt;(ADVT NO. CRPD/CR/2011-12/05 dated 27-12-2011 &amp;amp; CRPD/CR/2011-12/5A dated 01-03-2012)&lt;br /&gt;Written Examination held on 27-05-2012 &amp;amp; 03-06-2012&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/3671573281042980633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sbi-results-clerical-recruitment.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3671573281042980633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3671573281042980633'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sbi-results-clerical-recruitment.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-8358472195546692969</id><published>2012-08-14T19:26:00.000+05:30</published><updated>2012-08-14T19:27:16.635+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Replace characters in javascript </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot;&gt;
Replace characters in javascript
&lt;/h3&gt;
&lt;div class=&quot;post-header&quot;&gt;

&lt;/div&gt;
In server side we have &quot;Replace&quot; method to replace the characters in a 
string but on javascript replace method will be not useful in certain 
cases instead of that we can do for loop to replace the particular 
characters and get the specific output.&lt;br /&gt;
Example :
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small;&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;var StringChar = &quot;this is my 324o234u324t2342p234u234t&quot;; //Your string to get replaced&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In this case i need to remove the numbers and get the filtered output.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Replace Method in Javascript :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var ReplacedCharacters = String.replace(&quot;0123456789&quot;,&quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Output : &amp;nbsp; &lt;b&gt;&quot;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;b&gt;this is my 324o234u324t2342p234u234t&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;b&gt;&quot;&lt;/b&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In this cases we can do like this :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var ReplacedChar = &quot;&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var Characters = &quot;&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var InValidChars = &quot;0123456789&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (d = 0; d &amp;lt; StringChar.length; d++) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Characters = StringChar.charAt(d);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (InValidChars.indexOf(Characters) == -1) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ReplacedChar = ReplacedChar +&amp;nbsp;Characters;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: inherit;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the resulting output is : &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;ReplacedChar = &lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;b&gt;this is my output&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/8358472195546692969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/replace-characters-in-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8358472195546692969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8358472195546692969'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/replace-characters-in-javascript.html' title='Replace characters in javascript '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-1174801183952696850</id><published>2012-08-14T19:24:00.000+05:30</published><updated>2012-08-14T19:27:16.618+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>how to get sum of 2 or more text box values in javascript </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot;&gt;
&lt;br /&gt;
&lt;/h3&gt;
&lt;div class=&quot;post-header&quot;&gt;

&lt;/div&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;ADD TWO OR MORE TEXT BOX VALUES IN JAVA SCRIPT&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Generally we will add&amp;nbsp;text box&amp;nbsp;values &amp;nbsp;in&amp;nbsp;java script&amp;nbsp;as follows&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;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Test out with the 2 Text boxes ,
 to see what yours should do. Enter a 2 in the first box, and a 2 in the
 second box. Then third Text Box will get updated by sum value&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here we are using&amp;nbsp;key 
press&amp;nbsp;event to validate and allow only numbers,&amp;nbsp;Key Up&amp;nbsp;event to sum of 
the values and update in third text box.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;so to ADD two or More text box values in java script follow this code :-&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;JAVA SCRIPT&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function AllowOnlyNumbers(obj, e) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var key = window.event ? e.keyCode : e.which;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((key &amp;gt; 45 &amp;amp;&amp;amp; key &amp;lt; 58) || key == 8) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (key == 47) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&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; }&lt;br /&gt;
&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; return false;&lt;br /&gt;
&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; if (obj.value == &quot;&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (key == 46) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var DecimalCount = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (d = 0; d &amp;lt; obj.value.length; d++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var Character = obj.value.charAt(d);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (Character == &quot;.&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DecimalCount++;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (key == 46) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (DecimalCount == 1) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function SumValue() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var txtbox1 = document.getElementById(&quot;TextBox1&quot;).value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (txtbox1 == &quot;&quot; || txtbox1 == &quot;.&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txtbox1 = 0;&lt;br /&gt;
&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; var txtbox2 = document.getElementById(&quot;TextBox2&quot;).value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (txtbox2 == &quot;&quot; || txtbox2 == &quot;.&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txtbox2 = 0;&lt;br /&gt;
&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; var txtbox3 = document.getElementById(&quot;TextBox3&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; txtbox3.value = parseFloat(txtbox1) + parseFloat(txtbox2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=8942547654388455253&quot; name=&quot;more&quot;&gt;&lt;/a&gt;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;ASPX PAGE&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; onKeyUp=&quot;return 
SumValue();&quot; onkeypress=&quot;return 
AllowOnlyNumbers(this,event);&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TextBox ID=&quot;TextBox2&quot; runat=&quot;server&quot; onKeyUp=&quot;return 
SumValue();&quot; onkeypress=&quot;return 
AllowOnlyNumbers(this,event);&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TextBox ID=&quot;TextBox3&quot; runat=&quot;server&quot; onKeyUp=&quot;return 
SumValue();&quot; onkeypress=&quot;return 
AllowOnlyNumbers(this,event);&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;u&gt;OUTPUT&lt;/u&gt;&lt;/span&gt;&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/AVvXsEjDn8wsM9Lu4OA2eVWz2v7IxoUo6zzPtpBBtYdFlspC7Ne_uzwBc-72bLAf9Ff8FgDJRGpZwNo9GXZQNnjz_5SO6CKcW8ggV62YNVrNab4GdoSm4Bsxe-DIWGamxDKafOKrD_Hl75u1yw/s1600/sum.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;23&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDn8wsM9Lu4OA2eVWz2v7IxoUo6zzPtpBBtYdFlspC7Ne_uzwBc-72bLAf9Ff8FgDJRGpZwNo9GXZQNnjz_5SO6CKcW8ggV62YNVrNab4GdoSm4Bsxe-DIWGamxDKafOKrD_Hl75u1yw/s400/sum.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/1174801183952696850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/how-to-get-sum-of-2-or-more-text-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1174801183952696850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1174801183952696850'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/how-to-get-sum-of-2-or-more-text-box.html' title='how to get sum of 2 or more text box values in javascript '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDn8wsM9Lu4OA2eVWz2v7IxoUo6zzPtpBBtYdFlspC7Ne_uzwBc-72bLAf9Ff8FgDJRGpZwNo9GXZQNnjz_5SO6CKcW8ggV62YNVrNab4GdoSm4Bsxe-DIWGamxDKafOKrD_Hl75u1yw/s72-c/sum.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-35245306048453181</id><published>2012-08-14T19:20:00.000+05:30</published><updated>2012-08-14T19:27:16.625+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Word Documents and Excel Documents in IFRAME</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot;&gt;
&lt;br /&gt;

&lt;/h3&gt;
&lt;div class=&quot;post-header&quot;&gt;

&lt;/div&gt;
In this below example we are converting word OR excel document to HTML.&lt;br /&gt;
&lt;br /&gt;
In this case&amp;nbsp;we are converting and giving converted HTML file as &quot;&quot;src&quot;&quot; to &quot;&quot;iframe&quot;&quot;.&lt;br /&gt;
&lt;u style=&quot;color: cyan;&quot;&gt;Step By Step Procedure&lt;/u&gt;&lt;span style=&quot;color: cyan;&quot;&gt;&amp;nbsp;:&lt;/span&gt;&lt;br style=&quot;color: cyan;&quot; /&gt;&lt;span style=&quot;color: cyan;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
1)First step is create one folder in your application which needs to 
maintain the documents in that because iframe will take src within the 
application itself,outside of the application it will not work.&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/AVvXsEjdAqsGt30RzBr1TXw0WT_5KSVCRO-5x2PmHd5GQYxOF0yZs_YaK7TZifZyi2HMj4OXG5J9R8ESM4Wqr3KoMZtcDJhUYoD-tujfDlO1BVJPDEbpZG18BR92pFO8aIhkU4D6kKShUO0_Mg/s1600/DocFolder.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdAqsGt30RzBr1TXw0WT_5KSVCRO-5x2PmHd5GQYxOF0yZs_YaK7TZifZyi2HMj4OXG5J9R8ESM4Wqr3KoMZtcDJhUYoD-tujfDlO1BVJPDEbpZG18BR92pFO8aIhkU4D6kKShUO0_Mg/s1600/DocFolder.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
2) The aspx page as follows :&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&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/AVvXsEgbgOsxiqEeBY9VctQSixUlbd95btjoacOADnV_BneOnwEhNcFDsknoio4Pe5100-FEAe6WDWgi9raAUULmAPoxKE80BQTGWhYRqtcBcJuBW-qN9xsuskiZKs6kB74X7JgOW3Vv7gJLVw/s1600/Capture.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbgOsxiqEeBY9VctQSixUlbd95btjoacOADnV_BneOnwEhNcFDsknoio4Pe5100-FEAe6WDWgi9raAUULmAPoxKE80BQTGWhYRqtcBcJuBW-qN9xsuskiZKs6kB74X7JgOW3Vv7gJLVw/s400/Capture.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Add Interop.Excel &amp;amp; Interop.Word dll references for the application :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&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/AVvXsEgT4C4lk9PFHqW0a8hyphenhypheneqmYnr3f0_bfYmrCeM9ZuXLYxdhn5Ju2GETuqvA9Wy3KNomeP4nVV2C2JN12ziTIyvuE_Jkd0WMiB1s7W-_auAim-5Dba5o4Q843o2vlP6eo2fJ5iOuzLeDVYA/s1600/dll&#39;s.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4C4lk9PFHqW0a8hyphenhypheneqmYnr3f0_bfYmrCeM9ZuXLYxdhn5Ju2GETuqvA9Wy3KNomeP4nVV2C2JN12ziTIyvuE_Jkd0WMiB1s7W-_auAim-5Dba5o4Q843o2vlP6eo2fJ5iOuzLeDVYA/s1600/dll&#39;s.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://www.dropbox.com/s/etz3950fvyoazrx/WordToXl%28DLL%27s%29.rar&quot; target=&quot;_blank&quot;&gt;Click here to get the dll&#39;s&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
4) The button click event will be like this :&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
First get the binary data of file and save that file to its original 
format in documents folder.After saving the file according to the file 
extension convert to Html format and give the Html file as src for 
iframe.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;private Word.ApplicationClass MSWord; &amp;nbsp; &amp;nbsp; &amp;nbsp; // The Interop Object for Word&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;private Excel.ApplicationClass MSExcel; &amp;nbsp; &amp;nbsp; // The Interop Object for Excel&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;object Unknown = Type.Missing;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// For passing Empty values&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;protected void Page_Load(object sender, EventArgs e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;protected void btnView_Click(object sender, EventArgs e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] BinaryFile = null;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (FileUpload2.PostedFile != null)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int FileSize = FileUpload2.PostedFile.ContentLength;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BinaryFile = new byte[FileSize];&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileUpload2.PostedFile.InputStream.Read(BinaryFile, 0, (int)FileUpload2.PostedFile.ContentLength);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string FileName = FileUpload2.FileName;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lblFileName.Text = FileName;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string FileExtension = Path.GetExtension(FileName);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string FolderPath = Server.MapPath(&quot;~/Documents&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File.WriteAllBytes(FolderPath + &quot;\\&quot; + FileName, BinaryFile);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (FileExtension == &quot;.doc&quot; || FileExtension == &quot;.docx&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ConvertWordToHTML(FolderPath + &quot;\\&quot; + FileName, FolderPath + &quot;\\&quot; + FileName.Split(&#39;.&#39;)[0] + &quot;.html&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (FileExtension == &quot;.xls&quot; || FileExtension == &quot;.xlsx&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ConvertExcelToHTML(FolderPath + &quot;\\&quot; + FileName, FolderPath + &quot;\\&quot; + FileName.Split(&#39;.&#39;)[0] + &quot;.html&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; docPreview.Attributes[&quot;src&quot;] = &quot;../Documents/&quot; + FileName.Split(&#39;.&#39;)[0] + &quot;.html&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
This method is used to convert WordDocument to HTML :&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;public void ConvertWordToHTML(object FilePath, object SaveTarget)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MSWord == null)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord = new Word.ApplicationClass();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.Visible = false;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.Application.Visible = false;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.WindowState = Word.WdWindowState.wdWindowStateMinimize;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.Documents.Open(ref FilePath, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ref Unknown, ref Unknown, ref Unknown, ref Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object format = Word.WdSaveFormat.wdFormatHTML;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.ActiveDocument.SaveAs(ref SaveTarget, ref format,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; ref Unknown, ref Unknown, ref Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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;ref Unknown, ref Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MSWord != null)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.Documents.Close(ref Unknown, ref Unknown, ref Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSWord.Quit(ref Unknown, ref Unknown, ref Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
This method is used to convert ExcelDocument to HTML :
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;public void ConvertExcelToHTML(string Source, string Target)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MSExcel == null)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel = new Excel.ApplicationClass();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Visible = false;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Application.Visible = false;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.WindowState = Excel.XlWindowState.xlMinimized;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Workbooks.Open(Source, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown, Unknown, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown, Unknown, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown, Unknown, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unknown, Unknown, Unknown, Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; object format = Excel.XlFileFormat.xlHtml;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Workbooks[1].SaveAs(Target, format,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; Unknown, Unknown, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; Unknown, Excel.XlSaveAsAccessMode.xlExclusive, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; Unknown, Unknown, Unknown,&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&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; Unknown);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (MSExcel != null)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Workbooks.Close();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSExcel.Quit();&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
5) Here in my example i have taken fileupload to upload word and excel 
documents, after selecting a file by clicking View button we can view 
the output just like this :&lt;br /&gt;
&lt;br /&gt;
Output for WordDocument :&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/AVvXsEgljhWNeCZQOvzDpMf8B3LHufAgreKx0yXOR561CZ-LKxgFdNyQTKzAoytbs9NBYvhFG6RtG0bDJOMfG8HJ09i9HwQ0aOgifL1d6c5EffUQwt1OkXLeGki2jtUSNm85NiD1NW6kqd2YaQ/s1600/doc1.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgljhWNeCZQOvzDpMf8B3LHufAgreKx0yXOR561CZ-LKxgFdNyQTKzAoytbs9NBYvhFG6RtG0bDJOMfG8HJ09i9HwQ0aOgifL1d6c5EffUQwt1OkXLeGki2jtUSNm85NiD1NW6kqd2YaQ/s320/doc1.JPG&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Output for ExcelDocument :&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/AVvXsEglO__1QIAbYTZ8V0z4my02KYIVZl8bHlB8qMN7fvZPI_aWscZTR6_fnfdLbPogLVcgzNyVw70WpB3WA27b6og-KsjkxudTURUl42BifLcK7y3IJf-XlnsmmkyNyZk4BUJv185EdsowpA/s1600/excelop.JPG&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglO__1QIAbYTZ8V0z4my02KYIVZl8bHlB8qMN7fvZPI_aWscZTR6_fnfdLbPogLVcgzNyVw70WpB3WA27b6og-KsjkxudTURUl42BifLcK7y3IJf-XlnsmmkyNyZk4BUJv185EdsowpA/s320/excelop.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/35245306048453181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/word-documents-and-excel-documents-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/35245306048453181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/35245306048453181'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/word-documents-and-excel-documents-in.html' title='Word Documents and Excel Documents in IFRAME'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdAqsGt30RzBr1TXw0WT_5KSVCRO-5x2PmHd5GQYxOF0yZs_YaK7TZifZyi2HMj4OXG5J9R8ESM4Wqr3KoMZtcDJhUYoD-tujfDlO1BVJPDEbpZG18BR92pFO8aIhkU4D6kKShUO0_Mg/s72-c/DocFolder.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-3646427154147654417</id><published>2012-08-14T19:12:00.000+05:30</published><updated>2012-08-14T19:12:21.302+05:30</updated><title type='text'>difference between Web site and Web application ?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,
&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;Scenarios In Web application projects :
&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;
&lt;br /&gt;0.we want to create webapplication the folder structure like One 
Project file and as well as Reference folder and along with One assembly
 file ie located in Bin folder.
&lt;br /&gt;1.We want to the compiler to create a single assembly for the entire site.
&lt;br /&gt;2.we want to be able to use the Edit and Continue feature of the Visual Studio debugger.
&lt;br /&gt;3. we want to run unit tests on code that is in the class files that are associated with  ASP.NET pages.
&lt;br /&gt;4.we want to create project dependencies between multiple Web projects.
&lt;br /&gt;5.we want user MS-Build or Team Build for Compilation
&lt;br /&gt;6.we want avoid putting source code on a production server.
&lt;br /&gt;7.we want to use the automated deployment tools that are available in Visual Studio 2010.
&lt;br /&gt;
&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;Scenarios in which Web Sites :
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;0.we want to create website structure like folders and not having Reference folder
&lt;br /&gt;ask File Location
&lt;br /&gt;1.We want to include both C# and Visual Basic code in a single Web project
&lt;br /&gt;2.we want to open the production site in Visual Studio and update it in real time by using FTP.
&lt;br /&gt;3.If you pre compile the site, you want to be able to update 
individual ASP.NET Web pages (aspx files) without having to recompile 
the entire Web site.
&lt;br /&gt;4.if we want to create website ask File Location as FTP,HTTP etc
&lt;br /&gt;5.we want to be able to update individual files in production by 
just copying new versions to the production server, or by editing the 
files directly on the production server.
&lt;br /&gt; 
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/3646427154147654417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/difference-between-web-site-and-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3646427154147654417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3646427154147654417'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/difference-between-web-site-and-web.html' title='difference between Web site and Web application ?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-3168496534893983093</id><published>2012-08-12T11:04:00.001+05:30</published><updated>2012-08-12T11:04:17.532+05:30</updated><title type='text'>Intelligence Bureau Online Registration 2012</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;color: #cc0000; font-weight: bold;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intelligence BureauMinistryHome Affirs&lt;/span&gt;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;            &lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: red; font-weight: bold;&quot;&gt; Government of India&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.onlinesubmit.in/mha/welcome.aspx&quot;&gt;&lt;span style=&quot;color: #330000; font-style: italic; font-weight: bold;&quot;&gt;Apply Online Registration For the recruitment of Assistant Central Intelligence Officer-Grade-II/Executive examination-2012&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/3168496534893983093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/intelligence-bureau-online-registration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3168496534893983093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/3168496534893983093'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/intelligence-bureau-online-registration.html' title='Intelligence Bureau Online Registration 2012'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-2029608589185690957</id><published>2012-08-06T19:06:00.000+05:30</published><updated>2012-08-08T09:04:09.131+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Text to word"/><title type='text'>Extract Text from Word File with C#, VB.NET</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;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;In my last article, I introduce a pretty easy way to &lt;b&gt;extract images from word file&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Today,
 I will share another method to extract text from word document with C#,
 VB.NET. In our daily work, word document always plays an indispensable 
role. It has powerful functions to edit the text with different formats,
 such as font, header and footer, comments, hyperlink and so on. At the 
same time, it is just because this reason, we need to extract only the 
content without its format in a .txt file, while not using&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: Verdana; line-height: 22px; position: relative; text-align: left;&quot;&gt;document.SaveToFile&lt;/i&gt;&lt;i style=&quot;background-color: white; font-family: Verdana; line-height: 22px; position: relative; text-align: left;&quot;&gt;&amp;nbsp;&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;method to save Word as Text&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;directly.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;Easy way to extract text from word document with C#, VB.NET&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I am very happy that &lt;b&gt;Spire.Doc,&lt;/b&gt;&amp;nbsp;an MS Word component, can be my best hand to finish this task. Using &lt;b&gt;Spire.Doc&lt;/b&gt;, I only need&amp;nbsp;&lt;b&gt;three&lt;/b&gt;&amp;nbsp;simple steps to realize the text extraction function. If necessary,you can use the source code to freely download it.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;a href=&quot;http://www.e-iceblue.com/downloads/hot_fix/spire.doc_hotfix_4.2.11.zip&quot;&gt;&lt;b&gt;Spire.Doc Download Zip&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;Procedure&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step1. Create a new project&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;&lt;b&gt;1.&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; Create a new project in Visual Studio and set its Target framework to be .NET Framework 4.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: #993300;&quot;&gt;2.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&amp;nbsp; Add Spire.Doc DLL as reference.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;3.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&amp;nbsp; Add below using at the top of the method.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;b&gt;C#&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;using System.IO;
using Spire.Doc;
using Spire.Doc.Documents;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;VB.NET&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;Imports System.IO
Imports Spire.Doc
Imports Spire.Doc.Documents&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step2. Extract text from word document with C#, VB.NET&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;Load a Word document from system.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C# CODE:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Document doc = new Document();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;doc.LoadFromFile(@&quot;D:\michelle\JaneEyre.doc&quot;, FileFormat.Doc);&lt;/pre&gt;
&lt;b&gt;VB.NET CODE:&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim doc As New Document()
&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; doc.LoadFromFile(&quot;D:\michelle\JaneEyre.doc&quot;, FileFormat.Doc)&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;&lt;b&gt;2.&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp; Extract text from word document.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;b&gt;C# Code:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //new a stringBuilder to extract text from word document&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder sb = new StringBuilder();&amp;nbsp;&lt;b&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;/b&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//extract text from word document&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Section section in doc.Sections)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Paragraph paragraph in section.Paragraphs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sb.AppendLine(paragraph.Text);
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;
&lt;b&gt;VB.NET Code:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;new a stringBuilder to extract text from word document&lt;/b&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; Dim sb As New StringBuilder()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;extract text from word document&lt;/b&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; For Each section As Section In doc.Sections
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; For Each paragraph As Paragraph In section.Paragraphs
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sb.AppendLine(paragraph.Text)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Next&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step3. Save the text to a .txt file and launch the .txt file.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;C# Code:&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //write the text of word document into a txt file&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File.WriteAllText(@&quot;result.txt&quot;, sb.ToString());
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //launch the text file&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Process.Start(@&quot;result.txt&quot;);&lt;/pre&gt;
&lt;b&gt;VB.NET Code:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&#39;write the text of word document into a txt file&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File.WriteAllText(&quot;result.txt&quot;, sb.ToString())
&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&#39;launch the text file&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Process.Start(&quot;result.txt&quot;)&lt;/pre&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.e-iceblue.com/Knowledgebase/Spire.Doc/Program-Guide.html%20&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Code Source:&lt;/span&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;a href=&quot;http://everlasting129.weebly.com%20/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;b&gt;Blog Source:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/2029608589185690957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/extract-text-from-word-file-with-c-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2029608589185690957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2029608589185690957'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/extract-text-from-word-file-with-c-vbnet.html' title='Extract Text from Word File with C#, VB.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-8444656649491054835</id><published>2012-08-05T19:30:00.002+05:30</published><updated>2012-08-05T21:20:05.765+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdfs"/><title type='text'>Get Recent records from the table</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;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;Here is a small code snippet for getting the recent records from the table.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;drop table VENKAT_TABLE&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;go&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;create table Venkat_Table(code varchar(100),rate decimal(10,8),date1 date)&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;go&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;insert into VENKAT_TABLE values (&#39;sam&#39;, 1.240000, &#39;01/08/2004&#39;)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;insert into VENKAT_TABLE values (&#39;sam&#39;, 1.840000, &#39;02/08/2004&#39;)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;insert into VENKAT_TABLE values (&#39;pal&#39;, 1.240000, &#39;01/08/2005&#39;)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;insert into VENKAT_TABLE values (&#39;pal&#39;, 0.840000, &#39;10/08/2003&#39;)&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;select code,rate,date1 from&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;(&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;select ROW_NUMBER() over (partition by code order by date1) as rank1,*&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;&amp;nbsp; from VENKAT_TABLE ) t&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Georgia, &#39;Times New Roman&#39;, serif; line-height: 18px; text-align: left;&quot;&gt;&amp;nbsp; where rank1=1&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/8444656649491054835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/get-recent-records-from-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8444656649491054835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8444656649491054835'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/get-recent-records-from-table.html' title='Get Recent records from the table'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-375753932663841984</id><published>2012-08-05T19:29:00.001+05:30</published><updated>2012-08-05T21:20:05.748+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdfs"/><title type='text'>Session State Timeout 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;span style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; line-height: 18px; text-align: left;&quot;&gt;Recently, I thought of including some job related information in my website&lt;/span&gt;&lt;a href=&quot;http://www.kaashivinfotech.com/&quot; style=&quot;background-color: white; color: #888888; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;WWW.KaaShivInfoTech.com&lt;/span&gt;&lt;/a&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; line-height: 18px; text-align: left;&quot;&gt;After deploying my code, I faced a typical issue of application pool fill for the objects.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot; /&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Due
 to some poor coding, I allowed the user to logged in with a username 
and password. Unfortunately, I didn&#39;t give proper access for signing 
out.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Guessing,
 the session of the user took 30 minutes expiration time (Standard 
session expiration time). Since, most of the users are accessing this 
site and closing it with proper signing out. The objects started 
accumulating. At present, I dont have any idea to implement sign out 
option.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;So I thought putting some timeout options in the connection string&amp;nbsp;and web.config file. Thought of sharing the same to you all.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #2b91af; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 18px; text-align: left;&quot;&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;In
 the connection string, I&#39;ve added timout option as 5 minutes. If the 
database is accessed for more than 5 minutes, the connection should be 
thrown out.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;or else,&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span&gt;&lt;span style=&quot;color: blue; font-family: Arial, Helvetica, sans-serif;&quot;&gt;we can do some changes in web.config file under system.web section&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;cookieless=&quot;true&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;regenerateExpiredSessionId=&quot;true&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/375753932663841984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/session-state-timeout-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/375753932663841984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/375753932663841984'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/session-state-timeout-in-aspnet.html' title='Session State Timeout in ASP.Net'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-7159068658894863600</id><published>2012-08-05T19:26:00.000+05:30</published><updated>2012-08-05T21:20:05.760+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdfs"/><title type='text'>Difference between Stored Procedure (SP) and User Defined Function</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;User Defined Function can be
executed using the &quot;SELECT&quot; clause whereas Stored Procedure cannot be Executed..
&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 42.55pt; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -28.35pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;&amp;nbsp;User Defined Function does not return any output
parameters while Stored Procedure will return output parameters. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 42.55pt; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -28.35pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;User Defined Function cannot
make permanent changes to server environments while SP&#39;s can change some of the
server environment.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 42.55pt; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -28.35pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;&quot;&gt;Ø&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-IN&quot;&gt;If there is an error in UDF its
stops executing. But in SP&#39;s it just ignores the error and moves to the next
statement.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 42.55pt; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -28.35pt;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/7159068658894863600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/difference-between-stored-procedure-sp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7159068658894863600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7159068658894863600'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/difference-between-stored-procedure-sp.html' title='Difference between Stored Procedure (SP) and User Defined Function'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-1889178445099388462</id><published>2012-08-05T19:20:00.001+05:30</published><updated>2012-08-05T21:20:05.728+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdfs"/><title type='text'>Methods to Zoom PDF File by PDF Viewer with C#</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;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Zoom
 function in PDF file can help people change the text size of PDF 
document page according to their view preference or need. When you want 
to increase the percentage of the PDF file text, you can click the 
button of zoom out or choose the percentage number directly as well as 
scroll down your mouse. And if you want to zoom back to the original 
text size, you can click the Actual Size button. Actually, you can 
completely control the text percentage of the PDF document, which is 
much more convenient than the zoom of Excel and Word files. Now it is 
time to learn how to zoom PDF file by PDF Viewer with C#, VB.NET.&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;How to zoom PDF document by PDF Viewer with C#, VB.NET&lt;/span&gt;&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;In
 this article, I will introduce seven kinds of zoom functions to control
 PDF file text size by using a PDF Viewer component for .NET and WPF &lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Spire.PDFViewer&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;. &amp;nbsp;It&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;does NOT require Adobe&amp;nbsp;&lt;/strong&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Reader or any other 3rd party software/library installed on system.&lt;/strong&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;The whole procedure can be finished by below steps.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/spire.pdfviewer_1.2.zip&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;a href=&quot;http://tempuri.org/tempuri.html&quot;&gt;&lt;b&gt;Freely Download Spire.PDFViewer&amp;nbsp;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step1. &amp;nbsp;Create a new project.&lt;/span&gt;&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Create a new project in Windows Forms Application.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Set the Target Framework to be .NET Framework 2 or above in Properties.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Add
 a toolScript and pdfDocumentViewer in Form1 from Toolbox. Then, add 
seven buttons, two ComboBoxes and a label from the toolScript dropdown 
list in Form1.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Set
 the Properties of the tools respectively. Such as the &quot;Name&quot;, &quot;Display 
Style&quot;, &quot;Text&quot; and &quot; ToolTipText&quot; of buttons, ComboBoxes and label. You 
can set the Dock property of pdfDocumentViewer in its Properties in 
order to view the PDF in enough space.&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step2. Methods to zoom PDF file by Spire.PDFViewer&lt;/span&gt;&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Add Spire. PDFViewer.Forms dll as reference.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Add below namespace at the top of the method.&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;C# Code:&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;pre&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;using System.IO;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;using System.Windows.Forms;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;using Spire.PdfViewer.Forms;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Zoom PDF file. In this step, I have seven kinds of zoom fuctions to control the PDF text size. They are:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Zoom:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;Manually choose the percentage.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Zoom Out:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;Increase the PDF text size.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Zoom In:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;Decrease the PDF text size.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Zoom Dynamic:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;Scroll down/up the mouse directly to change the text size. A second click can cancel zoom dynamic.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;strong&gt;Actual Size:&lt;/strong&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;When you click it, the document changes to the original size.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;strong&gt;Fit Page:&lt;/strong&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;Fit page control the PDF page not going across the PDF page height and margin.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Fit Width:&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;When you click the Fit Width button, you cannot see the margin of PDF document and only see the PDF text content.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #993300; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&lt;strong&gt;Please look at the main code:&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #993300; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot;&gt;C# Code:&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px; text-align: left;&quot; /&gt;&lt;pre&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;namespace pdfzoom&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public partial class Form1 : Form&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Form1()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;//private bool _isZoomout = true;&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private int _zoom = 100;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private bool _isZoomDynamic = false;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void Form1_Load(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string pdfDoc = @&quot;D:\michelle\PDFViewer.pdf&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (File.Exists(pdfDoc))&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.LoadFromFile(pdfDoc);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //add zoom values to comboBox&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int[] intZooms = new Int32[] { 25, 50, 75, 100, 125, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000 };&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (int zoom in intZooms)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.comBoxZoom.Items.Add(zoom.ToString());&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxZoom.SelectedIndex = 3;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //pdfDocumentViewer mouseWheel event&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.MouseWheel += new MouseEventHandler(this.pdfDocumentViewer1_MouseWheel);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.LostFocus += new EventHandler(this.pdfDocumentViewer_LostFocus);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void pdfDocumentViewer_LostFocus(Object sender, EventArgs args)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._isZoomDynamic = false;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._zoom = 100;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void pdfDocumentViewer1_MouseWheel(Object sender, MouseEventArgs args)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this._isZoomDynamic)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; int wheelValue = (Int32)args.Delta / 24;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this._zoom += wheelValue;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; if (this._zoom &amp;lt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this._zoom = 0;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(this._zoom);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnOPen_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpenFileDialog dialog = new OpenFileDialog();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dialog.Filter = &quot;PDF document (*.pdf)|*.pdf&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DialogResult result = dialog.ShowDialog();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result == DialogResult.OK)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; try&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; string pdfFile = dialog.FileName;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.LoadFromFile(pdfFile);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; catch (Exception exe)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; MessageBox.Show(exe.Message, &quot;Spire.PdfViewer Demo&quot;, MessageBoxButtons.OK, MessageBoxIcon.Error);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;comBoxZoom_SelectedIndexChanged&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; int zoomValue = Int32.Parse(this.comBoxZoom.SelectedItem.ToString());&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(zoomValue);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnZoomOut_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; int delta = 10;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this._zoom += delta;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(this._zoom);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnZoonIn_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; int delta = 5;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this._zoom -= delta;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; if (this._zoom &amp;lt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this._zoom = 0;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(this._zoom);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnActural_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._zoom = 100;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._isZoomDynamic = false;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.btnDynamic.Text = &quot;Zoom Dynamic&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(100);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.comBoxZoom.SelectedIndex = 3;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnFitPage_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(ZoomMode.FitPage);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnFitWidth_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.PageCount &amp;gt; 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.ZoomTo(ZoomMode.FitWidth);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;btnDynamic_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._isZoomDynamic = !this._isZoomDynamic;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this._isZoomDynamic)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.btnDynamic.Text = &quot;Cancel dynamic zoom&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.btnDynamic.ToolTipText = &quot;Cancel dynamic zoom&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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;this.btnDynamic.Text = &quot;Zoom dynamic&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.btnDynamic.ToolTipText = &quot;Zoom dynamic&quot;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;pdfDocumentViewer1_PdfLoaded&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs args)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.btnDynamic.Enabled = true;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.Items.Clear();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int totalPage = this.pdfDocumentViewer1.PageCount;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 1; i &amp;lt;= totalPage; i++)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.comBoxPages.Items.Add(i.ToString());&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.SelectedIndex = 0;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;pdfDocumentViewer1_PageNumberChanged&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs args)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.comBoxPages.Items.Count &amp;lt;= 0)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; return;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (this.pdfDocumentViewer1.CurrentPageNumber != this.comBoxPages.SelectedIndex + 1)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.comBoxPages.SelectedIndex = this.pdfDocumentViewer1.CurrentPageNumber - 1;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;comBoxPages_SelectedIndexChanged&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int soucePage = this.pdfDocumentViewer1.CurrentPageNumber;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int targetPage = this.comBoxPages.SelectedIndex + 1;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (soucePage != targetPage)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&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; this.pdfDocumentViewer1.GoToPage(targetPage);&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;comBoxPages_Click&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;(object sender, EventArgs e)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step3. Debug the project&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Press F5 to launch the project&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Note:&lt;/span&gt; &lt;/strong&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;1.&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;If you click the buttons and they cannot operate the zoom functions, please check the click event of each button.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&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;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;2&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;. When the ComboBox cannot show page number in the dropdown list, pleae check the SelectedIndexChanged event of it.&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #993300; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Preview&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #993300; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_5996_Form1.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt; Form1&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_8242_Zoom%20Percentage.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&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; &amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Zoom Percentage&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_9218_Dynamic%20Zoom.png&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&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; &amp;nbsp; &lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&amp;nbsp;Zoom Dynamic&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: 15px; line-height: 22px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;As
 above picture, you can easily control the whole PDF document pages by 
the methods that I introduced by using Spire.PDF Viewer. Spire.PDFViewer
 not only enables you to open a PDF document that you load from system 
in the code, but also allows you to open any other PDF file by clicking 
the Open button in Form1, and then, choose it from a dialog box. You 
also can choose which page you want to view or read in the dropdown 
list. Why not give it a try?&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;Blog Source: &lt;span style=&quot;color: #990000;&quot;&gt;&lt;a href=&quot;htto://everlasting129.weebly.com&quot;&gt;htto://everlasting129.weebly.com&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;b&gt;Code Source:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://www.e-iceblue.com/&quot;&gt;&lt;b&gt;http://www.e-iceblue.com&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/1889178445099388462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/methods-to-zoom-pdf-file-by-pdf-viewer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1889178445099388462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/1889178445099388462'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/methods-to-zoom-pdf-file-by-pdf-viewer.html' title='Methods to Zoom PDF File by PDF Viewer with C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-998536034251849233</id><published>2012-08-05T19:16:00.001+05:30</published><updated>2012-08-05T21:20:05.770+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdfs"/><title type='text'>Page PDF Document by PDF Viewer with C#,VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
Things
 become difficult when a PDF document has tens or hundreds of pages. It 
wastes much time for people to reach the page that they want to go. 
Especially for those products manuals or statute books, because of its 
unchangeable character, PDF format becomes their best choice. But at the
 same time, it is neither possible to finish reading in a short period 
nor reach the right page in seconds. While things turn very easy when 
you use the PDF Viewer paging function, you can get the page by choose 
the page number or other buttons such as First, Previous, Next, Last and
 so on.&lt;br /&gt;&lt;br /&gt;In this post, I will share a method to page PDF Document 
by PDF Viewer with C#. VB.NET.It is very necessary for me to choose PDF 
Viewer compoenent&amp;nbsp;&lt;b&gt;Spire.PDFViewer&lt;/b&gt;&amp;nbsp;to be my tool. So please make sure that you&amp;nbsp;freely install Spire.PDFViewer on system.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/spire.pdfviewer_1.2.zip&quot;&gt;&lt;b&gt;Freely Download Spire.PDFViewer&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;&lt;strong&gt;How to page PDF Document by PDF Viewer with C#, VB.NET&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Using
 Spire.PDFViewer, I only use the below steps to finish this task. 
Because the code is a little long, so I only use C# to page the PDF 
Document. Please look at the following procedure.&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step1. Create a new project.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a new project in Windows Forms Application in Visual Studio.&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Choose .NET Framework 2 or above as the Target framework in Properties.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;Step2.Add reference and design the Form.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Spire.PDF DLL and Spire.PDFViewer Forms DLL as reference from your downladed Spire.PDFViewer.&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add a toolScript in Form 1. And then, add five buttons and a ComboBox at the same time in toolScript dropdown list.&lt;br /&gt;&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
 Set the Properties of the five buttons and the ComboBox. I set the 
buttons&#39; Name to be btn_Open, btn_First, btn_Previous, btn_Next, 
btn_Last.&amp;nbsp; The ComboBox to be comBoxPages . Also the default button 
DisplayStyle is &quot;image&quot;, I change it to be &quot;Text&quot; and set the &quot;Text&quot; to 
be &quot;Open, First, Previous, Next, Last&quot;&lt;br /&gt;&lt;br /&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add pdfDocumentViewer in Form1, and set its Dock in Properties to set the Form size.
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step3. Page PDF Document by PDF Viewer&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add the following using at the top of the method.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C#&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;using System.IO;
using Spire.PdfViewer;
using Spire.PdfViewer.Forms;
using Spire.Pdf;&lt;/pre&gt;
&lt;br /&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load a PDF file from system.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void Form1_Load(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 pdfDoc = @&quot;D:\michelle\Spire.Office.pdf&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (File.Exists(pdfDoc))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.LoadFromFile(pdfDoc);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;br /&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Open a PDF Document .&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void btnOpen_Click(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OpenFileDialog dialog = new OpenFileDialog();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dialog.Filter = &quot;PDF document (*.pdf)|*.pdf&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DialogResult result = dialog.ShowDialog();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result == DialogResult.OK)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 pdfFile = dialog.FileName;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.LoadFromFile(pdfFile);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
4. &amp;nbsp; Page the PDF file by PDF Viewer.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;private void&amp;nbsp;&lt;strong&gt;btnFirst_Click&lt;/strong&gt;(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (this.pdfDocumentViewer1.PageCount &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 currentPage = this.pdfDocumentViewer1.CurrentPageNumber;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (currentPage != 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.GoToFirstPage();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Current page is already the first!&quot;, &quot;Spire.PdfViewer Demo&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;btnPrevious_Click&lt;/strong&gt;(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (this.pdfDocumentViewer1.PageCount &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 currentPage = this.pdfDocumentViewer1.CurrentPageNumber;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (currentPage &amp;gt; 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.GoToPreviousPage();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Current page is already the first!&quot;, &quot;Spire.PdfViewer Demo&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;btnNext_Click&lt;/strong&gt;(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (this.pdfDocumentViewer1.PageCount &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 currentPage = this.pdfDocumentViewer1.CurrentPageNumber;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 totalPage = this.pdfDocumentViewer1.PageCount;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (currentPage &amp;lt; totalPage)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.GoToNextPage();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Current page is already the last!&quot;, &quot;Spire.PdfViewer Demo&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;pdfDocumentViewer1_PdfLoaded&lt;/strong&gt;(object sender, EventArgs args)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.Items.Clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int totalPage = this.pdfDocumentViewer1.PageCount;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 1; i &amp;lt;= totalPage; i++)
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.Items.Add(i.ToString());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.SelectedIndex = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;comBoxPages_SelectedIndexChanged&lt;/strong&gt;(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 soucePage = this.pdfDocumentViewer1.CurrentPageNumber;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int targetPage = this.comBoxPages.SelectedIndex + 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (soucePage != targetPage)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.GoToPage(targetPage);
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;btnLast_Click&lt;/strong&gt;(object sender, EventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (this.pdfDocumentViewer1.PageCount &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 currentPage = this.pdfDocumentViewer1.CurrentPageNumber;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 totalPage = this.pdfDocumentViewer1.PageCount;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (currentPage != totalPage)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.pdfDocumentViewer1.GoToLastPage();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&quot;Current page is already the last!&quot;, &quot;Spire.PdfViewer Demo&quot;, MessageBoxButtons.OK, MessageBoxIcon.Information);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void&amp;nbsp;&lt;strong&gt;pdfDocumentViewer1_PageNumberChanged&lt;/strong&gt;(object sender, EventArgs args)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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 (this.comBoxPages.Items.Count &amp;lt;= 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.pdfDocumentViewer1.CurrentPageNumber != this.comBoxPages.SelectedIndex + 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.comBoxPages.SelectedIndex = this.pdfDocumentViewer1.CurrentPageNumber - 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;/pre&gt;
&lt;br /&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Preview&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&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;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_2548_6313992.png&quot; /&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
You
 can either click the First, Previous, Next, Last button to view the PDF
 file or choose the page number to directly reach the page. The Open 
button allows you to open another PDF Document.
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b style=&quot;color: #993300;&quot;&gt;Code Source:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;a href=&quot;http://www.e-iceblue.com/Introduce/pdf-viewer.&quot;&gt;&lt;b&gt;http://www.e-iceblue.com/Introduce/pdf-viewer&lt;/b&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: left;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: x-small;&quot;&gt;&lt;b&gt;Blog Source: &lt;a href=&quot;http://www.dotnetfunda.com/blogs/lacy/2504/everlasting129.weebly.com&quot;&gt;http://everlasting129.weebly.com&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/998536034251849233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/page-pdf-document-by-pdf-viewer-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/998536034251849233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/998536034251849233'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/page-pdf-document-by-pdf-viewer-with.html' title='Page PDF Document by PDF Viewer with C#,VB.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-6945735213072046635</id><published>2012-08-05T19:13:00.001+05:30</published><updated>2012-08-05T19:14:12.989+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Text to word"/><title type='text'>Three Steps to Save Html File as Word Document with C#, VB.NET</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;background-color: white; font-family: Verdana; font-size: large; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Html&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;format has its specified character which cannot be replaced by other formats. So we often need to&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;convert&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;one
 format to multiple formats. Thus, the conversion software or 
applications with the conversion function is necessary. For word 
application Spire.Doc&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;users, it not only can&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;save&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;word as different formats but also can be converted by other formats, such as&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;html&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;and xml. Today, I am glad to share with the method how to&lt;b&gt; save&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;html as word with C#,VB.NET&lt;/strong&gt;&lt;em style=&quot;background-color: white; font-family: Verdana; line-height: 22px; position: relative; text-align: justify;&quot;&gt;&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;&lt;/em&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;You may say that you do not need to&lt;b&gt;&amp;nbsp;save&lt;/b&gt;&lt;strong&gt;&amp;nbsp;html as word with C#/VB.NET&amp;nbsp;&lt;/strong&gt;since you can use the copy and paste function, or you can right click the&amp;nbsp;&lt;strong&gt;html&amp;nbsp;&lt;/strong&gt;file to edit it and then it automatically opened as&amp;nbsp;&lt;strong&gt;word document&lt;/strong&gt;. Both ways can realize the conversion. In some sense, you are right. However, for some basic and simple&amp;nbsp;&lt;strong&gt;html&amp;nbsp;&lt;/strong&gt;files
 without image, you can easily do that through the methods above. But 
for those have images and a little complex, that measure is not 
available. When you edit the html, CSS is very likely to be ignored. So,
 using the method of&amp;nbsp;&lt;b&gt;save&lt;/b&gt;&lt;strong&gt;&amp;nbsp;html as word with C#,VB.NET&lt;/strong&gt;&amp;nbsp;becomes a best and most reliable mean. I use Spire.Doc to help me finish this task in a fast way.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/hot_fix/spire.doc_hotfix_4.2.11.zip&quot;&gt;&lt;b&gt;Spire.Doc Download Zip&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300;&quot;&gt;&lt;strong style=&quot;font-size: x-large;&quot;&gt;Procedure&lt;/strong&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step1.&lt;/span&gt;&amp;nbsp;Load a html file from the system.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step2.&lt;/span&gt;&amp;nbsp;Convert HTML to Word.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step3.&amp;nbsp;&lt;/span&gt;Preview the effect.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;color: #993300;&quot;&gt;&lt;strong&gt;Main Code:&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spire.Doc;
using Spire.Doc.Documents;
namespace html_to_word
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document document = new Document();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.LoadFromFile(@&quot;E:\TestScript\Sample.html&quot;, FileFormat.Html, XHTMLValidationType.None);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.SaveToFile(&quot;test.doc&quot;, FileFormat.Doc);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/pre&gt;
&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style=&quot;font-size: small;&quot;&gt;
&lt;/span&gt;Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports Spire.Doc
Imports Spire.Doc.Documents
Namespace Html2Doc
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Friend Class Program
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared Sub Main(ByVal args() As String)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim document As New Document()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                document.LoadFromFile(&quot;E:\TestScript\Sample.html&quot;,FileFormat.Html,XHTMLValidationType.None)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.SaveToFile(&quot;test.doc&quot;, FileFormat.Doc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Class
End Namespace&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong style=&quot;color: #993300; font-size: x-large;&quot;&gt;Preview&lt;/strong&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong style=&quot;color: #993300; font-size: x-large;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_0084_picture1.jpg&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
From
 the above procedure, you can obviously see that using Spire.Doc to save
 html as word with C#,VB.NET is not more complex than copy and paste 
function and edit methods. It is the most effective way to help people 
realize the conversion function. Not only html to word and xml to word 
conversion, but also word to epub, html, xml, tiff, rtf, tiff image, 
image and so on.&lt;br /&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: x-small;&quot;&gt;&lt;b&gt;Code Source:&lt;a href=&quot;http://www.e-iceblue.com/&quot;&gt; http://www.e-iceblue.com&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: x-small;&quot;&gt;&lt;b&gt;Blog Source: &lt;a href=&quot;http://everlasting129.weebly.com/&quot;&gt;http://everlasting129.weebly.com&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/6945735213072046635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/three-steps-to-save-html-file-as-word.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/6945735213072046635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/6945735213072046635'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/three-steps-to-save-html-file-as-word.html' title='Three Steps to Save Html File as Word Document with C#, VB.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-2590888034199221017</id><published>2012-08-05T19:04:00.002+05:30</published><updated>2012-08-05T19:09:26.170+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdf"/><title type='text'>Set Image Qaulity in Word to PDF Conversion with C#, VB.NET</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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;When
 we convert Word to PDF, we can easily manage the format of word 
document text in different ways. But for many images contained word 
files, we cannot control it very well since the size of the output PDF 
file is always larger than it of the original word document, which, 
sometimes, can bring inconvenience. Thus, in order to meet people&#39;s 
need, I would like to share a simple method to set the image quality 
when we convert word to PDF&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Setting the image quality, to a large extent, is to manage the size of the images in output PDF document. New version Spire.Doc&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;4.2.8 helps me set the image quality when convert word to PDF in a quick way with C#, VB.NET.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;How to set image quality in word to PDF conversion with C#,VB.NET&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;I am not sure whether other .net word component can realize this function, so please install Spire.Doc&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;first in your system.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/hot_fix/spire.doc_hotfix_4.2.11.zip&quot;&gt;Freely Download Spire.Doc Zip&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step1. Create a project&lt;br /&gt;&lt;/span&gt;1.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a new project in Visual Studio.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;2.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Spire.Doc Dll as reference. and then, add using at the top of the method. Please see below:&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C#&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;pre&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;using System;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;using System.Collections.Generic;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using System.Linq;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using System.Text;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using Spire.Doc;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; namespace image_quality&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;class Program&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;static void Main(string[] args)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&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;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VB.NET&amp;nbsp;&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;pre&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Imports Collections.Generic&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports System.Linq&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports System.Text&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports Spire.Doc&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; Namespace image_quality&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; Class Program&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub Main(args As String())&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;End Class&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; End Namespace&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step2. Load a Word file from system&lt;br /&gt;&lt;/span&gt;C# Code:&lt;/strong&gt;&lt;pre&gt;Document doc = new Document();
doc.LoadFromFile(@&quot;C:\Program Files\Spire.Doc\image quality.doc&quot;, FileFormat.Doc);&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;Dim doc As New Document()
doc.LoadFromFile(@&quot;C:\Program Files\Spire.Doc\image quality.doc&quot;, FileFormat.Doc);&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step3. Set image quality.&lt;/span&gt;&lt;/strong&gt;There
 are six images in the first page of my doc document,&amp;nbsp; I set the size of
 images all to be &quot;20&quot;. &amp;nbsp;If I have only one image, the size of the image
 is also&quot;20&quot;, so you can set it as your own need.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;doc.JPEGQuality = 20;&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;doc.JPEGQuality = 20;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;Step4. Save and launch the file&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.SaveToFile(&quot;Image.pdf&quot;, FileFormat.PDF);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Diagnostics.Process.Start(&quot;Image.pdf&quot;);&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;doc.SaveToFile(&quot;Image.pdf&quot;, FileFormat.PDF);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Diagnostics.Process.Start(&quot;Image.pdf&quot;);&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;Preview&lt;/span&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&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;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_9265_2.JPG&quot; /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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;Word Images&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_6589_4.JPG&quot; /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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; &amp;nbsp; &amp;nbsp;PDF Images&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
The
 original word document size is 63KB. If I convert the word file 
directly to PDF, it is 80.5 KB. After I set the image quality, it 
changes to 58 KB. That is the clear difference.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.e-iceblue.com/Knowledgebase/Spire.Doc/Program-Guide.html&quot;&gt;Code Source&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://everlasting129.weebly.com/&quot;&gt;Blog Source&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana ! important; line-height: 22px ! important; margin: 0px; padding: 5px 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;; font-size: 12pt;&quot;&gt; &lt;a href=&quot;http://atozfreshersinterview.blogspot.in/p/linq.html&quot;&gt;What is Language Integrated Query (LINQ)?&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/sql-server-2012-new-features-for-net.html&quot;&gt;Sql Server 2012 New Features for .NET Developer&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-1.html&quot;&gt;State Management in ASP.NET part-1 (Cookies)&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq.html&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14.0pt; mso-bidi-font-size: 10.0pt;&quot;&gt;SQL Server FAQ&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://atozfreshersinterview.blogspot.in/2012/08/easily-set-pdf-view-preference-with_8955.html&quot;&gt;Top 15 IT Certifications for 2012&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana ! important; line-height: 22px ! important; margin: 0px; padding: 5px 0px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;div style=&quot;background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: transparent; border: medium none; color: black; overflow: hidden; text-align: left; text-decoration: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/2590888034199221017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/set-image-qaulity-in-word-to-pdf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2590888034199221017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2590888034199221017'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/set-image-qaulity-in-word-to-pdf.html' title='Set Image Qaulity in Word to PDF Conversion with C#, VB.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-8157778957154414458</id><published>2012-08-05T19:00:00.001+05:30</published><updated>2012-08-05T19:09:35.577+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdf"/><title type='text'></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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;When
 we convert Word to PDF, we can easily manage the format of word 
document text in different ways. But for many images contained word 
files, we cannot control it very well since the size of the output PDF 
file is always larger than it of the original word document, which, 
sometimes, can bring inconvenience. Thus, in order to meet people&#39;s 
need, I would like to share a simple method to set the image quality 
when we convert word to PDF&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Setting the image quality, to a large extent, is to manage the size of the images in output PDF document. New version Spire.Doc&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;4.2.8 helps me set the image quality when convert word to PDF in a quick way with C#, VB.NET.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;How to set image quality in word to PDF conversion with C#,VB.NET&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;I am not sure whether other .net word component can realize this function, so please install Spire.Doc&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;first in your system.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/hot_fix/spire.doc_hotfix_4.2.11.zip&quot;&gt;Freely Download Spire.Doc Zip&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step1. Create a project&lt;br /&gt;&lt;/span&gt;1.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a new project in Visual Studio.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;2.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Spire.Doc Dll as reference. and then, add using at the top of the method. Please see below:&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C#&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;pre&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;using System;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;using System.Collections.Generic;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using System.Linq;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using System.Text;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using Spire.Doc;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; namespace image_quality&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;class Program&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;static void Main(string[] args)&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&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;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VB.NET&amp;nbsp;&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;pre&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Imports Collections.Generic&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports System.Linq&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports System.Text&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;Imports Spire.Doc&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; Namespace image_quality&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; Class Program&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub Main(args As String())&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp; .&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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;End Class&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&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; End Namespace&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step2. Load a Word file from system&lt;br /&gt;&lt;/span&gt;C# Code:&lt;/strong&gt;&lt;pre&gt;Document doc = new Document();
doc.LoadFromFile(@&quot;C:\Program Files\Spire.Doc\image quality.doc&quot;, FileFormat.Doc);&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;Dim doc As New Document()
doc.LoadFromFile(@&quot;C:\Program Files\Spire.Doc\image quality.doc&quot;, FileFormat.Doc);&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Step3. Set image quality.&lt;/span&gt;&lt;/strong&gt;There
 are six images in the first page of my doc document,&amp;nbsp; I set the size of
 images all to be &quot;20&quot;. &amp;nbsp;If I have only one image, the size of the image
 is also&quot;20&quot;, so you can set it as your own need.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;doc.JPEGQuality = 20;&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;doc.JPEGQuality = 20;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;Step4. Save and launch the file&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.SaveToFile(&quot;Image.pdf&quot;, FileFormat.PDF);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Diagnostics.Process.Start(&quot;Image.pdf&quot;);&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;doc.SaveToFile(&quot;Image.pdf&quot;, FileFormat.PDF);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Diagnostics.Process.Start(&quot;Image.pdf&quot;);&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;Preview&lt;/span&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&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;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_9265_2.JPG&quot; /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: medium;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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;Word Images&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_6589_4.JPG&quot; /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&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; &amp;nbsp; &amp;nbsp;PDF Images&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;color: #993300; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
The
 original word document size is 63KB. If I convert the word file 
directly to PDF, it is 80.5 KB. After I set the image quality, it 
changes to 58 KB. That is the clear difference.&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.e-iceblue.com/Knowledgebase/Spire.Doc/Program-Guide.html&quot;&gt;Code Source&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;paragraph&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: #993300; font-size: small;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://everlasting129.weebly.com/&quot;&gt;Blog Source&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/8157778957154414458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/when-we-convert-word-to-pdf-we-can.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8157778957154414458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8157778957154414458'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/when-we-convert-word-to-pdf-we-can.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-4230746146652996056</id><published>2012-08-05T18:22:00.001+05:30</published><updated>2012-08-05T18:23:57.900+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="pdf"/><title type='text'>Easily Set PDF View Preference with C#,VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Preference&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;belongs to everyone, almost everybody has&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;preferences&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;.&amp;nbsp; If you choose ten person and&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;view&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;the
 layout of their desktop, the result may make you feel it is amazing 
that all the desktops are different both in the backdrop and the 
position of content. What makes this? It is&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;view preference.&lt;/strong&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Recently, I read a book, a research shows that the&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;view preference&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;of
 people in American differs from people in China, the view preference of
 American is &quot;F&quot;, but the Chinese is &quot;Column&quot;. Thus, satisfying the&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;view preference&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;of different people is significant. For software applications, providing the function of setting the&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;view preference&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&amp;nbsp;by people themselves gains great popularity. Of course, as to PDF creation component &lt;b&gt;Spire.PDF&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;users, viewing the PDF page according to their own like is rather easy. Please follow the below procedure.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.e-iceblue.com/downloads/spire.pdf_2.3.zip&quot;&gt;Spire.PDF Download Zip&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;background-color: white; color: #663333; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;strong&gt;Procedure&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step1.&lt;/span&gt;&amp;nbsp;Create a new project .&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; font-size: small; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;1.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Create a new project in Console Application in Visual Studio.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;2.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Set the Target framework to be .NET Framework 2 or above.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step2.&lt;/span&gt;&amp;nbsp;Add reference.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;1.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Add System Drawing and Spire.PDF Dll as references in Project at the top of the Visual Studio.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;strong style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;2.&lt;/strong&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Add following using at the top of the method.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;using System.Drawing;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;using Spire.Pdf;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;using Spire.Pdf.Graphics;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;strong&gt;VB.NET&lt;/strong&gt;&lt;/span&gt;&lt;pre&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Imports System.Drawing&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Imports Spire.Pdf&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;Imports Spire.Pdf.Graphics&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: Verdana; line-height: 22px; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step3.&lt;/span&gt;&amp;nbsp;Set PDF view preference.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;1.&lt;/strong&gt;Create a new PDF Document.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&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;strong&gt;//Create a pdf document.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfDocument doc = new PdfDocument();
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create one page&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfPageBase page = doc.Pages.Add();&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Create a pdf document.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim doc As New PdfDocument()
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Create one page&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim page As PdfPageBase = doc.Pages.Add()&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;background-color: white; font-family: Verdana !important; line-height: 22px !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px; text-align: justify;&quot;&gt;
&lt;strong&gt;2.&lt;/strong&gt;&amp;nbsp;Draw the created page.&lt;br /&gt;&lt;br /&gt;In
 a first sight, you may find that this step is a little complicated, 
because the code is really long, but the fact is not like that. You can 
divide this step to be three: page header, title and content. If you 
have icon and reference content, you can set them, but not all PDF pages
 have an icon and reference content. If you have an existing PDF 
Document and want to set view preference, this step should be avoided.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;private static void DrawPage(PdfPageBase page)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float pageWidth = page.Canvas.ClientSize.Width;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float y = 0;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //page header&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfPen pen1 = new PdfPen(Color.LightGray, 1f);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfBrush brush1 = new PdfSolidBrush(Color.LightGray);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTrueTypeFont font1 = new PdfTrueTypeFont(new Font(&quot;Arial&quot;, 8f, FontStyle.Italic));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringFormat format1 = new PdfStringFormat(PdfTextAlignment.Right);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String text = &quot;Demo of Spire.Pdf&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text, font1, brush1, pageWidth, y, format1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SizeF size = font1.MeasureString(text, format1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height + 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawLine(pen1, 0, y, pageWidth, y);
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //title&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + 5;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfBrush brush2 = new PdfSolidBrush(Color.Black);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTrueTypeFont font2 = new PdfTrueTypeFont(new Font(&quot;Arial&quot;, 16f, FontStyle.Bold));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringFormat format2 = new PdfStringFormat(PdfTextAlignment.Center);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format2.CharacterSpacing = 1f;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text = &quot;Summary of Science&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text, font2, brush2, pageWidth / 2, y, format2);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font2.MeasureString(text, format2);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height + 6;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //icon&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfImage image = PdfImage.FromFile
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (@&quot;C:\Program Files\e-iceblue\Spire.Pdf\Demos\Data\Wikipedia_Science.png&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawImage(image, new PointF(pageWidth - image.PhysicalDimension.Width, y));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float imageLeftSpace = pageWidth - image.PhysicalDimension.Width - 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float imageBottom = image.PhysicalDimension.Height + y;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //refenrence content&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTrueTypeFont font3 = new PdfTrueTypeFont(new Font(&quot;Arial&quot;, 9f));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringFormat format3 = new PdfStringFormat();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.ParagraphIndent = font3.Size * 2;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.MeasureTrailingSpaces = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.LineSpacing = font3.Size * 1.5f;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String text1 = &quot;(All text and picture from &quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String text2 = &quot;Wikipedia&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String text3 = &quot;, the free encyclopedia)&quot;;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text1, font3, brush2, 0, y, format3);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font3.MeasureString(text1, format3);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float x1 = size.Width;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.ParagraphIndent = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTrueTypeFont font4 = new PdfTrueTypeFont(new Font(&quot;Arial&quot;, 9f, FontStyle.Underline));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfBrush brush3 = PdfBrushes.Blue;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text2, font4, brush3, x1, y, format3);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font4.MeasureString(text2, format3);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x1 = x1 + size.Width;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text3, font3, brush2, x1, y, format3);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height;
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //content&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringFormat format4 = new PdfStringFormat();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text = System.IO.File.ReadAllText
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (@&quot;C:\Program Files\e-iceblue\Spire.Pdf\Demos\Data\Summary_of_Science.txt&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PdfTrueTypeFont font5 = new PdfTrueTypeFont(new Font(&quot;Arial&quot;, 10f));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format4.LineSpacing = font5.Size * 1.5f;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringLayouter textLayouter = new PdfStringLayouter();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; float imageLeftBlockHeight = imageBottom - y;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfStringLayoutResult result
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;= textLayouter.Layout(text, font5, format4, new SizeF(imageLeftSpace, imageLeftBlockHeight));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result.ActualSize.Height &amp;lt; imageBottom - y)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageLeftBlockHeight = imageLeftBlockHeight + result.LineHeight;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = textLayouter.Layout(text, font5, format4, new SizeF(imageLeftSpace, imageLeftBlockHeight));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (LineInfo line in result.Lines)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(line.Text, font5, brush2, 0, y, format4);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + result.LineHeight;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTextWidget textWidget = new PdfTextWidget(result.Remainder, font5, brush2);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PdfTextLayout textLayout = new PdfTextLayout();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textLayout.Break = PdfLayoutBreakType.FitPage;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textLayout.Layout = PdfLayoutType.Paginate;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RectangleF bounds = new RectangleF(new PointF(0, y), page.Canvas.ClientSize);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textWidget.StringFormat = format4;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textWidget.Draw(page, bounds, textLayout);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Private Shared Sub DrawPage(ByVal page As PdfPageBase)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pageWidth As Single = page.Canvas.ClientSize.Width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim y As Single = 0
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;page header&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pen1 As New PdfPen(Color.LightGray, 1.0F)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim brush1 As PdfBrush = New PdfSolidBrush(Color.LightGray)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim font1 As New PdfTrueTypeFont(New Font(&quot;Arial&quot;, 8.0F, FontStyle.Italic))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim format1 As New PdfStringFormat(PdfTextAlignment.Right)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim text As String = &quot;Demo of Spire.Pdf&quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text, font1, brush1, pageWidth, y, format1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim size As SizeF = font1.MeasureString(text, format1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawLine(pen1, 0, y, pageWidth, y)
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;title&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + 5
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim brush2 As PdfBrush = New PdfSolidBrush(Color.Black)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim font2 As New PdfTrueTypeFont(New Font(&quot;Arial&quot;, 16.0F, FontStyle.Bold))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim format2 As New PdfStringFormat(PdfTextAlignment.Center)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format2.CharacterSpacing = 1.0F
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text = &quot;Summary of Science&quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text, font2, brush2, pageWidth / 2, y, format2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font2.MeasureString(text, format2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height + 6
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&amp;nbsp;&#39;icon&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim image As PdfImage = PdfImage.FromFile
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(&quot;C:\Program Files\e-iceblue\Spire.Pdf\Demos\Data\Wikipedia_Science.png &quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;page.Canvas.DrawImage(image, New PointF(pageWidth - image.PhysicalDimension.Width, y))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim imageLeftSpace As Single = pageWidth - image.PhysicalDimension.Width - 2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim imageBottom As Single = image.PhysicalDimension.Height + y
&lt;strong&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;&#39;refenrence content&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim font3 As New PdfTrueTypeFont(New Font(&quot;Arial&quot;, 9.0F))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim format3 As New PdfStringFormat()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.ParagraphIndent = font3.Size * 2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.MeasureTrailingSpaces = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;format3.LineSpacing = font3.Size * 1.5F
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim text1 As String = &quot;(All text and picture from &quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim text2 As String = &quot;Wikipedia&quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim text3 As String = &quot;, the free encyclopedia)&quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text1, font3, brush2, 0, y, format3)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font3.MeasureString(text1, format3)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim x1 As Single = size.Width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format3.ParagraphIndent = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim font4 As New PdfTrueTypeFont(New Font(&quot;Arial&quot;, 9.0F, FontStyle.Underline))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim brush3 As PdfBrush = PdfBrushes.Blue
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text2, font4, brush3, x1, y, format3)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = font4.MeasureString(text2, format3)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x1 = x1 + size.Width
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page.Canvas.DrawString(text3, font3, brush2, x1, y, format3)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + size.Height
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;content&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim format4 As New PdfStringFormat()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text = System.IO.File.ReadAllText
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&quot;C:\Program Files\e-iceblue\Spire.Pdf\Demos\Data\Summary_of_Science.txt &quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim font5 As New PdfTrueTypeFont(New Font(&quot;Arial&quot;, 10.0F))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format4.LineSpacing = font5.Size * 1.5F
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim textLayouter As New PdfStringLayouter()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim imageLeftBlockHeight As Single = imageBottom - y
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim result As PdfStringLayoutResult _
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = textLayouter.Layout(text, font5, format4, New SizeF(imageLeftSpace, imageLeftBlockHeight))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If result.ActualSize.Height &amp;lt; imageBottom - y Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imageLeftBlockHeight = imageLeftBlockHeight + result.LineHeight
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = textLayouter.Layout(text, font5, format4, New SizeF(imageLeftSpace, imageLeftBlockHeight))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each line As LineInfo In result.Lines
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;page.Canvas.DrawString(line.Text, font5, brush2, 0, y, format4)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = y + result.LineHeight
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next line
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim textWidget As New PdfTextWidget(result.Remainder, font5, brush2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim textLayout As New PdfTextLayout()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textLayout.Break = PdfLayoutBreakType.FitPage
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textLayout.Layout = PdfLayoutType.Paginate
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim bounds As New RectangleF(New PointF(0, y), page.Canvas.ClientSize)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textWidget.StringFormat = format4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textWidget.Draw(page, bounds, textLayout)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
3.Set PDF view preferences.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set view reference&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.CenterWindow = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.DisplayTitle = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.FitWindow = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;doc.ViewerPreferences.HideMenubar = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.HideToolbar = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage;&lt;/pre&gt;
&lt;br /&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&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;strong&gt;&#39;set view reference&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.CenterWindow = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.DisplayTitle = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.FitWindow = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.HideMenubar = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.HideToolbar = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.ViewerPreferences.PageLayout = PdfPageLayout.SinglePage&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #3366ff;&quot;&gt;Step4.&amp;nbsp;&lt;/span&gt;Save the PDF file and launch it.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C# Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Save pdf file.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.SaveToFile(&quot;ViewerPreference.pdf&quot;);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.Close();
&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;strong&gt;//Launching the Pdf file.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Process.Start(&quot;ViewerPreference.pdf&quot;);&lt;/pre&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;strong&gt;VB.NET Code:&lt;/strong&gt;&lt;br /&gt;&lt;pre&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;strong&gt;&#39;Save pdf file.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.SaveToFile(&quot;ViewerPreference.pdf&quot;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.Close()
&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Launching the Pdf file.&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process.Start(&quot;ViewerPreference.pdf&quot;)&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph editable-text&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;strong&gt;&lt;span style=&quot;color: #663333; font-size: medium;&quot;&gt;Preview&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #663333; font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Lacy_3429_2358081.JPG&quot; /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/4230746146652996056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/easily-set-pdf-view-preference-with_8955.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/4230746146652996056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/4230746146652996056'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/easily-set-pdf-view-preference-with_8955.html' title='Easily Set PDF View Preference with C#,VB.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-639683465737333145</id><published>2012-08-04T13:07:00.001+05:30</published><updated>2012-08-04T13:12:42.435+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><title type='text'>SQL Server FAQ</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 align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 14.0pt; mso-bidi-font-size: 10.0pt;&quot;&gt;SQL Server FAQ&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transact-SQL Optimization
Tips&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;u&gt;views and stored procedures&lt;/u&gt; instead of heavy-duty
     queries.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can reduce network traffic, because your client will send to server
     only stored procedure or view name (perhaps with some parameters) instead
     of large heavy-duty queries text. This can be used to facilitate
     permission management also, because you can restrict user access to table
     columns they should not see. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to use &lt;u&gt;constraints&lt;/u&gt; instead of triggers, whenever
     possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Constraints are much more efficient than triggers and can boost
     performance. So, you should use constraints instead of triggers, whenever
     possible. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;u&gt;table variables &lt;/u&gt;instead of temporary tables.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Table variables require less locking and logging resources than temporary
     tables, so table variables should be used whenever possible. The table
     variables are available in SQL Server 2000 only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to use &lt;u&gt;UNION ALL statement&lt;/u&gt; instead of UNION, whenever
     possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The UNION ALL statement is much faster than UNION, because UNION ALL statement
     does not look for duplicate rows, and UNION statement does look for
     duplicate rows, whether or not they exist. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid using the DISTINCT&lt;/u&gt; clause, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Because using the DISTINCT clause will result in some performance
     degradation, you should use this clause only when it is necessary. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid using SQL Server cursors&lt;/u&gt;, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     SQL Server cursors can result in some performance degradation in
     comparison with select statements. Try to use correlated sub-query or
     derived tables, if you need to perform row-by-row operations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid the HAVING clause&lt;/u&gt;, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The HAVING clause is used to restrict the result set returned by the GROUP
     BY clause. When you use GROUP BY with the HAVING clause, the GROUP BY
     clause divides the rows into sets of grouped rows and aggregates their
     values, and then the HAVING clause eliminates undesired aggregated groups.
     In many cases, you can write your select statement so, that it will
     contain only WHERE and GROUP BY clauses without HAVING clause. This can
     improve the performance of your query. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If you need to return the total table&#39;s row count, you can use
     alternative way instead of SELECT COUNT(*) statement.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Because &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; statement make a full table scan to return the
     total table&#39;s row count, it can take very many time for the large table.
     There is another way to determine the total row count in a table. You can
     use sysindexes system table, in this case. There is ROWS column in the
     sysindexes table. This column contains the total row count for each table
     in your database. So, you can use the following select statement instead
     of &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*): SELECT rows FROM
     sysindexes WHERE id = OBJECT_ID(&#39;table_name&#39;) AND indid &amp;lt; 2 &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;So, you can improve the speed of such queries in
     several times. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Include &lt;u&gt;SET NOCOUNT ON statement into your stored procedures &lt;/u&gt;to
     stop the message indicating the number of rows affected by a T-SQL
     statement.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can reduce network traffic, because your client will not receive the
     message indicating the number of rows affected by a T-SQL statement. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to restrict the queries result set by &lt;u&gt;using the WHERE&lt;/u&gt;
     clause.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can results in good performance benefits, because SQL Server will
     return to client only particular rows, not all rows from the table(s).
     This can reduce network traffic and boost the overall performance of the
     query. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use the select statements with &lt;u&gt;TOP keyword or the SET ROWCOUNT&lt;/u&gt;
     statement, if you need to return only the first n rows.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can improve performance of your queries, because the smaller result
     set will be returned. This can also reduce the traffic between the server
     and the clients. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to restrict the queries result set by r&lt;u&gt;eturning only the
     particular columns&lt;/u&gt; from the table, not all table&#39;s columns.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can results in good performance benefits, because SQL Server will
     return to client only particular columns, not all table&#39;s columns. This
     can reduce network traffic and boost the overall performance of the query.
     &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1.Indexes&lt;br /&gt;
2.avoid more number of triggers on the table&lt;br /&gt;
3.unnecessary complicated joins&lt;br /&gt;
4.correct use of Group by clause with the select list&lt;br /&gt;
5.in worst cases Denormalization&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Index Optimization tips&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Every
     index increases the time in takes to perform INSERTS, UPDATES and DELETES,
     so the number of indexes &lt;u&gt;should not be very much&lt;/u&gt;. Try to use
     maximum 4-5 indexes on one table, not more. If you have read-only table,
     then the number of indexes may be increased. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Keep
     your indexes as narrow as possible. This reduces the size of the index and
     reduces the number of reads required to read the index. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try
     to create indexes on columns that &lt;u&gt;have integer values&lt;/u&gt; rather than
     character values. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     you create a composite (multi-column) index, the order of the columns in
     the key are very important. Try to order the columns in the key as to enhance
     selectivity, with the most selective columns to the leftmost of the key. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     you want to join several tables, try to create surrogate integer keys for
     this purpose and create indexes on their columns. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create
     surrogate integer primary key (identity for example) if your table will
     not have many insert operations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Clustered
     indexes are more preferable than nonclustered, if you need to select by a
     range of values or you need to sort results set with GROUP BY or ORDER BY.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     your application will be performing the same query over and over on the
     same table, consider creating a covering index on the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You
     can use the SQL Server Profiler Create Trace Wizard with &quot;Identify
     Scans of Large Tables&quot; trace to determine which tables in your
     database may need indexes. This trace will show which tables are being
     scanned by queries instead of using an index. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You
     can use &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_MSforeachtable&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; undocumented stored procedure to rebuild all
     indexes in your database. Try to schedule it to execute during CPU idle
     time and slow production periods.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_MSforeachtable @command1=&quot;print &#39;?&#39; DBCC
     DBREINDEX (&#39;?&#39;)&quot;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;T-SQL Queries&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2
     tables &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin-left: .5in; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 20.0%;&quot; width=&quot;20%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Employee&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Phone&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;empid&lt;br /&gt;
  empname&lt;br /&gt;
  salary&lt;br /&gt;
  mgrid&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;empid&lt;br /&gt;
  phnumber&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;2&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Select
     all employees who doesn&#39;t have phone?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT empname&lt;br /&gt;
     FROM Employee&lt;br /&gt;
     WHERE (empid NOT IN&lt;br /&gt;
     (SELECT DISTINCT empid&lt;br /&gt;
     FROM phone))&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select
     the employee names who is having more than one phone numbers.&lt;br /&gt;
     SELECT empname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM phone&lt;br /&gt;
     GROUP BY empid&lt;br /&gt;
     HAVING COUNT(empid) &amp;gt; 1)) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select
     the details of 3 max salaried employees from employee table.&lt;br /&gt;
     SELECT TOP 3 empid, salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     ORDER BY salary DESC &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Display
     all managers from the table. (manager id is same as emp id)&lt;br /&gt;
     SELECT empname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT DISTINCT mgrid&lt;br /&gt;
     FROM employee))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write
     a Select statement to list the Employee Name, Manager Name under a
     particular manager?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT e1.empname AS EmpName, e2.empname AS ManagerName&lt;br /&gt;
     FROM Employee e1 INNER JOIN&lt;br /&gt;
     Employee e2 ON e1.mgrid = e2.empid&lt;br /&gt;
     ORDER BY e2.mgrid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2
     tables emp and phone.&lt;br /&gt;
     emp fields are - empid, name&lt;br /&gt;
     Ph fields are - empid, ph (office, mobile, home). Select all employees who
     doesn&#39;t have any ph nos.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM employee LEFT OUTER JOIN&lt;br /&gt;
     phone ON employee.empid = phone.empid&lt;br /&gt;
     WHERE (phone.office IS NULL OR phone.office = &#39; &#39;)&lt;br /&gt;
     AND (phone.mobile IS NULL OR phone.mobile = &#39; &#39;)&lt;br /&gt;
     AND (phone.home IS NULL OR phone.home = &#39; &#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find
     employee who is living in more than one city. &lt;br /&gt;
     Two Tables: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 30.0%;&quot; width=&quot;30%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Emp&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;City&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Empid&lt;br /&gt;
  empName&lt;br /&gt;
  Salary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Empid&lt;br /&gt;
  City&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;9&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
     empname, fname, lname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM city&lt;br /&gt;
     GROUP BY empid&lt;br /&gt;
     HAVING COUNT(empid) &amp;gt; 1))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find
     all employees who is living in the same city. (table is same as above)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT fname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM city a&lt;br /&gt;
     WHERE city IN&lt;br /&gt;
     (SELECT city&lt;br /&gt;
     FROM city b&lt;br /&gt;
     GROUP BY city&lt;br /&gt;
     HAVING COUNT(city) &amp;gt; 1)))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table named MovieTable with three columns - moviename, person and
     role. Write a query which gets the movie details where Mr. Amitabh and Mr.
     Vinod acted and their role is actor.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DISTINCT m1.moviename&lt;br /&gt;
     FROM MovieTable m1 INNER JOIN&lt;br /&gt;
     MovieTable m2 ON m1.moviename = m2.moviename&lt;br /&gt;
     WHERE (m1.person = &#39;amitabh&#39; AND m2.person = &#39;vinod&#39; OR&lt;br /&gt;
     m2.person = &#39;amitabh&#39; AND m1.person = &#39;vinod&#39;) AND (m1.role = &#39;actor&#39;) AND
     (m2.role = &#39;actor&#39;)&lt;br /&gt;
     ORDER BY m1.moviename&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     are two employee tables named emp1 and emp2. Both contains same structure
     (salary details). But Emp2 salary details are incorrect and emp1 salary
     details are correct. So, write a query which corrects salary details of
     the table emp2&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;update a set a.sal=b.sal from emp1 a, emp2 b where
     a.empid=b.empid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given
     a Table named “Students” which contains studentid, subjectid and marks.
     Where there are 10 subjects and 50 students. Write a Query to find out the
     Maximum marks obtained in each subject. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In
     this same tables now write a SQL Query to get the studentid also to
     combine with previous results. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Three
     tables – student , course, marks – how do go at finding name of the
     students who got max marks in the diff courses.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT student.name, course.name AS coursename, marks.sid,
     marks.mark&lt;br /&gt;
     FROM marks INNER JOIN&lt;br /&gt;
     student ON marks.sid = student.sid INNER JOIN&lt;br /&gt;
     course ON marks.cid = course.cid&lt;br /&gt;
     WHERE (marks.mark =&lt;br /&gt;
     (SELECT MAX(Mark)&lt;br /&gt;
     FROM Marks MaxMark&lt;br /&gt;
     WHERE MaxMark.cID = Marks.cID))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table day_temp which has three columns dayid, day and temperature.
     How do I write a query to get the difference of temperature among each
     other for seven days of a week?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT a.dayid, a.dday, a.tempe, a.tempe - b.tempe AS
     Difference&lt;br /&gt;
     FROM day_temp a INNER JOIN&lt;br /&gt;
     day_temp b ON a.dayid = b.dayid + 1&lt;br /&gt;
     OR&lt;br /&gt;
     Select a.day, a.degree-b.degree from temperature a, temperature b where
     a.id=b.id+1&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table which contains the names like this. a1, a2, a3, a3, a4, a1, a1,
     a2 and their salaries. Write a query to get grand total salary, and total
     salaries of individual employees in one query.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT empid, SUM(salary) AS salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     GROUP BY empid WITH ROLLUP&lt;br /&gt;
     ORDER BY empid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to know how many tables contains empno as a column in a
     database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*) AS Counter&lt;br /&gt;
     FROM syscolumns&lt;br /&gt;
     WHERE (name = &#39;empno&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find duplicate rows in a table? OR I have a table with one column
     which has many records which are not distinct. I need to find the distinct
     values from that column and number of times it’s repeated.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     SELECT sid, mark, COUNT(*) AS Counter&lt;br /&gt;
     FROM marks&lt;br /&gt;
     GROUP BY sid, mark&lt;br /&gt;
     HAVING (COUNT(*) &amp;gt; 1)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to delete the rows which are duplicate (don’t delete both
     duplicate records).&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET ROWCOUNT 1&lt;br /&gt;
     DELETE yourtable&lt;br /&gt;
     FROM yourtable a&lt;br /&gt;
     WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND b.age1
     = a.age1) &amp;gt; 1&lt;br /&gt;
     WHILE @@rowcount &amp;gt; 0&lt;br /&gt;
     &amp;nbsp; DELETE yourtable&lt;br /&gt;
     &amp;nbsp; FROM yourtable a&lt;br /&gt;
     &amp;nbsp; WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND
     b.age1 = a.age1) &amp;gt; 1&lt;br /&gt;
     SET ROWCOUNT 0&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find 6th highest salary&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT TOP 1 salary&lt;br /&gt;
     FROM (SELECT DISTINCT TOP 6 salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     ORDER BY salary DESC) a&lt;br /&gt;
     ORDER BY salary&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find top salary among two tables&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT TOP 1 sal&lt;br /&gt;
     FROM (SELECT MAX(sal) AS sal&lt;br /&gt;
     FROM sal1&lt;br /&gt;
     UNION&lt;br /&gt;
     SELECT MAX(sal) AS sal&lt;br /&gt;
     FROM sal2) a&lt;br /&gt;
     ORDER BY sal DESC&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a query to convert all the letters in a word to upper case&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT UPPER(&#39;test&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a query to round up the values of a number. For example even
     if the user enters 7.1 it should be rounded up to 8.&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CEILING (7.1)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a SQL Query to find first day of month?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DATENAME(dw, DATEADD(dd, -
     DATEPART(dd, GETDATE()) + 1, GETDATE())) AS FirstDay&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 2.0in;&quot; width=&quot;192&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Datepart&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Abbreviations&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;year&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;yy, yyyy&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;quarter&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;qq, q&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;month&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;mm, m&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dayofyear&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dy, y&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;day&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dd, d&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;week&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;wk, ww&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;weekday&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dw&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;hour&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;hh&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;minute&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;mi, n&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;second&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ss, s&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;millisecond&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ms&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;26&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Table
     A contains column1 which is primary key and has 2 values (1, 2) and Table
     B contains column1 which is primary key and has 2 values (2, 3). Write a
     query which returns the values that are not common for the tables and the
     query should return one column with 2 records.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT tbla.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a &amp;lt;&amp;gt;&lt;br /&gt;
     (SELECT tblb.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a = tblb.a)&lt;br /&gt;
     UNION&lt;br /&gt;
     SELECT tblb.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tblb.a &amp;lt;&amp;gt;&lt;br /&gt;
     (SELECT tbla.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a = tblb.a)&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR (better approach)&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT a&lt;br /&gt;
     FROM tbla&lt;br /&gt;
     WHERE a NOT IN&lt;br /&gt;
     (SELECT a&lt;br /&gt;
     FROM tblb)&lt;br /&gt;
     UNION ALL&lt;br /&gt;
     SELECT a&lt;br /&gt;
     FROM tblb&lt;br /&gt;
     WHERE a NOT IN&lt;br /&gt;
     (SELECT a&lt;br /&gt;
     FROM tbla)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     are 3 tables Titles, Authors and Title-Authors (check PUBS db). Write the
     query to get the author name and the number of books written by that
     author, the result should start from the author who has written the
     maximum number of books and end with the author who has written the
     minimum number of books.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT authors.au_lname, COUNT(*) AS BooksCount&lt;br /&gt;
     FROM authors INNER JOIN&lt;br /&gt;
     titleauthor ON authors.au_id = titleauthor.au_id INNER JOIN&lt;br /&gt;
     titles ON titles.title_id = titleauthor.title_id&lt;br /&gt;
     GROUP BY authors.au_lname&lt;br /&gt;
     ORDER BY BooksCount DESC&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE emp_master&lt;br /&gt;
     SET emp_sal = &lt;br /&gt;
     CASE&lt;br /&gt;
     WHEN emp_sal &amp;gt; 0 AND emp_sal &amp;lt;= 20000 THEN (emp_sal * 1.01) &lt;br /&gt;
     WHEN em&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;p_sal &amp;gt; 20000 THEN (emp_sal
     * 1.02) &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;List
     all products with total quantity ordered, if quantity ordered is null show
     it as 0.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT name, CASE WHEN SUM(qty) IS NULL THEN 0 WHEN
     SUM(qty) &amp;gt; 0 THEN SUM(qty) END AS tot&lt;br /&gt;
     FROM [order] RIGHT OUTER JOIN&lt;br /&gt;
     product ON [order].prodid = product.prodid&lt;br /&gt;
     GROUP BY name&lt;br /&gt;
     Result:&lt;br /&gt;
     coke 60&lt;br /&gt;
     mirinda 0&lt;br /&gt;
     pepsi 10&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ANY,
     SOME, or ALL?&lt;br /&gt;
     ALL means greater than every value--in other words, greater than the
     maximum value. For example, &amp;gt;ALL (1, 2, 3) means greater than 3.&lt;br /&gt;
     ANY means greater than at least one value, that is, greater than the
     minimum. So &amp;gt;ANY (1, 2, 3) means greater than 1. SOME is an SQL-92
     standard equivalent for ANY. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;IN
     &amp;amp; = (difference in correlated sub query)&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;INDEX&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Index? It’s purpose?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Indexes in databases are similar
     to indexes in books. In a database, an index allows the database program
     to find data in a table without scanning the entire table. An index in a
     database is a list of values in a table with the storage locations of rows
     in the table that contain each value. Indexes can be created on either a
     single column or a combination of columns in a table and are implemented
     in the form of B-trees. An index contains an entry with one or more
     columns (the search key) from each row in a table. A B-tree is sorted on
     the search key, and can be searched efficiently on any leading subset of
     the search key. For example, an index on columns &lt;b&gt;A&lt;/b&gt;, &lt;b&gt;B&lt;/b&gt;, &lt;b&gt;C&lt;/b&gt;
     can be searched efficiently on &lt;b&gt;A&lt;/b&gt;, on &lt;b&gt;A&lt;/b&gt;, &lt;b&gt;B&lt;/b&gt;, and &lt;b&gt;A&lt;/b&gt;,
     &lt;b&gt;B&lt;/b&gt;, &lt;b&gt;C&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Explain about Clustered and non clustered index? How to choose
     between a Clustered Index and a Non-Clustered Index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are clustered and
     nonclustered indexes. A clustered index is a special type of index that
     reorders the way records in the table are physically stored. Therefore
     table can have &lt;u&gt;only one clustered index&lt;/u&gt;. The leaf nodes of a
     clustered index contain the data pages. &lt;br /&gt;
     A nonclustered index is a special type of index in which the logical order
     of the index does not match the physical stored order of the rows on disk.
     The leaf nodes of a nonclustered index does not consist of the data pages.
     Instead, the leaf nodes contain index rows.&lt;br /&gt;
     Consider using a clustered index for: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;circle&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Columns that contain a large number of distinct
      values. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Queries that return a range of values using
      operators such as BETWEEN, &amp;gt;, &amp;gt;=, &amp;lt;, and &amp;lt;=. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Columns that are accessed sequentially. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Queries that return large result sets.&lt;br /&gt;
      Non-clustered indexes have the same B-tree structure as clustered
      indexes, with two significant differences: &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The data rows are not sorted and stored in order
      based on their non-clustered keys. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The leaf layer of a non-clustered index does not
      consist of the data pages. Instead, the leaf nodes contain index rows.
      Each index row contains the non-clustered key value and one or more row
      locators that point to the data row (or rows if the index is not unique)
      having the key value. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Per table only &lt;u&gt;249 non clustered &lt;/u&gt;indexes.
      &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Disadvantage of index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Every index increases the time
     in takes to perform INSERTS, UPDATES and DELETES, so the number of indexes
     should not be very much. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given a scenario that I have a 10 Clustered Index in a Table to
     all their 10 Columns. What are the advantages and disadvantages?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A: Only 1 clustered index is
     possible. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I enforce to use particular index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use index hint
     (index=&amp;lt;index_name&amp;gt;) after the table name.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT au_lname FROM authors (index=aunmind)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Index Tuning?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;One of the hardest tasks facing
     database administrators is the selection of appropriate columns for
     non-clustered indexes. You should consider creating non-clustered indexes
     on any columns that are frequently referenced in the WHERE clauses of SQL
     statements. Other good candidates are columns referenced by JOIN and GROUP
     BY operations.&lt;br /&gt;
     You may wish to also consider creating non-clustered indexes that cover
     all of the columns used by certain frequently issued queries. These
     queries are referred to as “covered queries” and experience excellent
     performance gains.&lt;br /&gt;
     Index Tuning is the process of finding appropriate column for
     non-clustered indexes.&lt;br /&gt;
     SQL Server provides a wonderful facility known as the Index Tuning Wizard
     which greatly enhances the index selection process. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between Index defrag and Index rebuild?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When you create an index in the
     database, the index information used by queries is stored in index pages.
     The sequential index pages are chained together by pointers from one page
     to the next. When changes are made to the data that affect the index, the
     information in the index can become scattered in the database. Rebuilding
     an index reorganizes the storage of the index data (and table data in the
     case of a clustered index) to remove fragmentation. This can improve disk
     performance by reducing the number of page reads required to obtain the
     requested data&lt;br /&gt;
     DBCC INDEXDEFRAG - Defragments clustered and secondary indexes of the specified
     table or view.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is sorting and what is the difference between sorting &amp;amp;
     clustered indexes?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The ORDER BY clause &lt;u&gt;sorts&lt;/u&gt;
     query results by one or more columns up to 8,060 bytes. This will happen
     by the time when we retrieve data from database. &lt;u&gt;Clustered indexes&lt;/u&gt;
     physically sorting data, while inserting/updating the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are statistics, under what circumstances they go out of date,
     how do you update them?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Statistics determine the
     selectivity of the indexes. If an indexed column has unique values then
     the selectivity of that index is more, as opposed to an index with
     non-unique values. Query optimizer uses these indexes in determining
     whether to choose an index or not while executing a query.&lt;br /&gt;
     Some situations under which you should update statistics:&lt;br /&gt;
     1) If there is significant change in the key values in the index&lt;br /&gt;
     2) If a large amount of data in an indexed column has been added, changed,
     or removed (that is, if the distribution of key values has changed), or
     the table has been truncated using the TRUNCATE TABLE statement and then
     repopulated&lt;br /&gt;
     3) Database is upgraded from a previous version &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is fillfactor? What is the use of it ? What happens when we
     ignore it? When you should use low fill factor?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When you create a clustered
     index, the data in the table is stored in the data pages of the database
     according to the order of the values in the indexed columns. When new rows
     of data are inserted into the table or the values in the indexed columns
     are changed, Microsoft® SQL Server™ 2000 may have to reorganize the
     storage of the data in the table to make room for the new row and maintain
     the ordered storage of the data. This also applies to nonclustered
     indexes. When data is added or changed, SQL Server may have to reorganize
     the storage of the data in the nonclustered index pages. When a new row is
     added to a full index page, SQL Server moves approximately half the rows
     to a new page to make room for the new row. This reorganization is known
     as a page split. Page splitting can impair performance and fragment the
     storage of the data in a table.&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;When creating an index, you can specify a fill factor to leave extra
     gaps and reserve a percentage of free space on each leaf level page of the
     index to accommodate future expansion in the storage of the table&#39;s data
     and reduce the potential for page splits. The fill factor value is a
     percentage from 0 to 100 that specifies how much to fill the data pages
     after the index is created. A value of 100 means the pages will be full
     and will take the least amount of storage space. This setting should be
     used only when there will be no changes to the data, for example, on a
     read-only table. A lower value leaves more empty space on the data pages,
     which reduces the need to split data pages as indexes grow but requires
     more storage space. This setting is more appropriate when there will be
     changes to the data in the table.&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;br /&gt;
     &lt;b&gt;DATA TYPES&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the data types in SQL &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 357.0pt;&quot; width=&quot;476&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bigint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Binary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bit&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;char&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;cursor&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;datetime&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Decimal&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;image&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;money&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ntext&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;nvarchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;real&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;smalldatetime&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Smallint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;smallmoney&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;text&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;timestamp&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tinyint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Varbinary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Varchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;uniqueidentifier&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;43&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between char and nvarchar / char and varchar data-type?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     char[(n)] - Fixed-length non-Unicode character data with length of n
     bytes. n must be a value from 1 through 8,000. Storage size is n bytes.
     The SQL-92 synonym for char is character.&lt;br /&gt;
     nvarchar(n) - Variable-length Unicode character data of n characters. n
     must be a value from 1 through 4,000. Storage size, in bytes, is two times
     the number of characters entered. The data entered can be 0 characters in
     length. The SQL-92 synonyms for nvarchar are national char varying and
     national character varying. &lt;br /&gt;
     varchar[(n)] - Variable-length non-Unicode character data with length of n
     bytes. n must be a value from 1 through 8,000. Storage size is the actual
     length in bytes of the data entered, not n bytes. The data entered can be
     0 characters in length. The SQL-92 synonyms for varchar are char varying
     or character varying. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;GUID datasize?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;128bit &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How GUID becoming unique across machines?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To ensure uniqueness across
     machines, the ID of the network card is used (among others) to compute the
     number. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between text and image data type?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Text and image. Use text for
     character data if you need to store more than 255 characters in SQL Server
     6.5, or more than 8000 in SQL Server 7.0. Use image for binary large
     objects (BLOBs) such as digital images. With text and image data types,
     the data is not stored in the row, so the limit of the page size does not
     apply.All that is stored in the row is a pointer to the database pages
     that contain the data.Individual text, ntext, and image values can be a
     maximum of 2-GB, which is too long to store in a single data row.&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;JOINS&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sometimes we have to select data
     from two or more tables to make our result complete. We have to perform a
     join. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How many types of Joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Joins can be categorized as: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;48&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Inner joins (the typical join operation, which
      uses some comparison operator like = or &amp;lt;&amp;gt;). These include
      equi-joins and natural joins. &lt;br /&gt;
      Inner joins use a comparison operator to match rows from two tables based
      on the values in common columns from each table. For example, retrieving
      all rows where the student identification number is the same in both the &lt;b&gt;students
      &lt;/b&gt;and &lt;b&gt;courses &lt;/b&gt;tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Outer joins. Outer joins can be a left, a right,
      or full outer join. &lt;br /&gt;
      Outer joins are specified with one of the following sets of keywords when
      they are specified in the FROM clause: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;LEFT JOIN or LEFT OUTER JOIN -The result set of
       a left outer join includes all the rows from the left table specified in
       the LEFT OUTER clause, not just the ones in which the joined columns
       match. When a row in the left table has no matching rows in the right
       table, the associated result set row contains null values for all select
       list columns coming from the right table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;RIGHT JOIN or RIGHT OUTER JOIN&amp;nbsp;- A right
       outer join is the reverse of a left outer join. All rows from the right
       table are returned. Null values are returned for the left table any time
       a right table row has no matching row in the left table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;FULL JOIN or FULL OUTER JOIN&amp;nbsp;- A full
       outer join returns all rows in both the left and right tables. Any time
       a row has no match in the other table, the select list columns from the
       other table contain null values. When there is a match between the
       tables, the entire result set row contains data values from the base
       tables. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Cross joins&amp;nbsp;- Cross joins return all rows
      from the left table, each row from the left table is combined with all
      rows from the right table. Cross joins are also called &lt;b&gt;Cartesian
      products.&lt;/b&gt; (A Cartesian join will get you a Cartesian product. A
      Cartesian join is when you join every row of one table to every row of
      another table. You can also get one by joining every row of a table to
      every row of itself.) &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is self join?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table can be joined to itself
     in a self-join. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the differences between UNION and JOINS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A join selects columns from 2 or
     more tables. A union selects rows. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can I improve performance by using the ANSI-style joins instead of
     the old-style joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Code Example 1:&lt;br /&gt;
     &lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select o.name, i.name&lt;br /&gt;
     from sysobjects o, sysindexes i&lt;br /&gt;
     where o.id = i.id&lt;br /&gt;
     &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Code Example 2:&lt;br /&gt;
     &lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select o.name, i.name&lt;br /&gt;
     from sysobjects o inner join sysindexes i&lt;br /&gt;
     on o.id = i.id&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You will not get any performance
     gain by switching to the ANSI-style JOIN syntax.&lt;br /&gt;
     Using the ANSI-JOIN syntax gives you an important advantage: Because the
     join logic is cleanly separated from the filtering criteria, you can
     understand the query logic more quickly.&lt;br /&gt;
     The SQL Server old-style JOIN executes the filtering conditions before
     executing the joins, whereas the ANSI-style JOIN reverses this procedure
     (join logic precedes filtering).&lt;br /&gt;
     Perhaps the most compelling argument for switching to the ANSI-style JOIN
     is that Microsoft has explicitly stated that SQL Server will not support
     the old-style OUTER JOIN syntax indefinitely. Another important
     consideration is that the ANSI-style JOIN supports query constructions
     that the old-style JOIN syntax does not support. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12.0pt; mso-list: l0 level1 lfo4; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is derived table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Derived tables are SELECT
     statements in the FROM clause referred to by an alias or a user-specified
     name. The result set of the SELECT in the FROM clause forms a table used
     by the outer SELECT statement. For example, this SELECT uses a derived
     table to find if any store carries all book titles in the &lt;b&gt;pubs&lt;/b&gt;
     database: &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT ST.stor_id, ST.stor_name&lt;br /&gt;
     FROM stores AS ST,&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT stor_id, COUNT(DISTINCT title_id) AS
     title_count&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sales&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GROUP BY stor_id&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) AS SA&lt;br /&gt;
     WHERE ST.stor_id = SA.stor_id&lt;br /&gt;
     AND SA.title_count = (SELECT COUNT(*) FROM titles)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;STORED PROCEDURE&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;53&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A stored procedure is a set of
     Structured Query Language (SQL) statements that you assign a name to and
     store in a database in compiled form so that you can share it between a
     number of programs. &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They allow modular programming. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They allow faster execution. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They can reduce network traffic. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They can be used as a security mechanism. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different types of Storage Procedure?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;1&quot; type=&quot;a&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Temporary
      Stored Procedures - SQL Server supports two types of temporary
      procedures: local and global. A local temporary procedure is visible only
      to the connection that created it. A global temporary procedure is
      available to all connections. Local temporary procedures are
      automatically dropped at the end of the current session. Global temporary
      procedures are dropped at the end of the last session using the
      procedure. Usually, this is when the session that created the procedure
      ends. Temporary procedures named with # and ## can be created by any
      user. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;System
      stored procedures are created and stored in the &lt;b&gt;master&lt;/b&gt; database
      and have the &lt;b&gt;sp_&lt;/b&gt; prefix.(or xp_) System stored procedures can be
      executed from any database without having to qualify the stored procedure
      name fully using the database name &lt;b&gt;master&lt;/b&gt;. (If any user-created
      stored procedure has the same name as a system stored procedure, the
      user-created stored procedure will never be executed.) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Automatically
      Executing Stored Procedures - One or more stored procedures can execute
      automatically when SQL Server starts. The stored procedures must be
      created by the system administrator and executed under the &lt;b&gt;sysadmin&lt;/b&gt;
      fixed server role as a background process. The procedure(s) cannot have
      any input parameters. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;User stored
      procedure &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;55&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do I mark the stored procedure to automatic execution? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_procoption&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
     system stored procedure to mark the stored procedure to automatic
     execution when the SQL Server will start. Only objects in the master
     database owned by dbo can have the startup setting changed and this option
     is restricted to objects that have no parameters.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE master&lt;br /&gt;
     EXEC sp_procoption &#39;indRebuild&#39;, &#39;startup&#39;, &#39;true&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will know whether the SQL statements are executed?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When used in a stored procedure,
     the RETURN statement can specify an integer value to return to the calling
     application, batch, or procedure. If no value is specified on RETURN, a
     stored procedure returns the value 0.&amp;nbsp; The stored procedures return a
     value of 0 when no errors were encountered. Any nonzero value indicates an
     error occurred. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Why one should not prefix user stored procedures with sp_?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It is strongly recommended that
     you do not create any stored procedures using sp_ as a prefix. SQL Server
     always looks for a stored procedure beginning with sp_ in this order: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;5&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure in the master database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure based on any qualifiers provided (database name or owner). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure using dbo as the owner, if one is not specified. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Therefore, although the
user-created stored procedure prefixed with sp_ may exist in the current
database, the master database is always checked first, even if the stored
procedure is qualified with the database name. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;58&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What can cause a Stored procedure execution plan to become
     invalidated and/or fall out of cache?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Server restart &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Plan is aged out due to low use &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;DBCC FREEPROCCACHE (sometime desired to force
      it) &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When do one need to recompile stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;if a new index is added from
     which the stored procedure might benefit, optimization does not automatically
     happen (until the next time the stored procedure is run after SQL Server
     is restarted). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server provides three ways to recompile a stored procedure: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;sp_recompile&lt;/b&gt; system stored procedure
      forces a recompile of a stored procedure the next time it is run. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Creating a stored procedure that specifies the
      WITH RECOMPILE option in its definition indicates that SQL Server does
      not cache a plan for this stored procedure; the stored procedure is
      recompiled each time it is executed. Use the WITH RECOMPILE option when
      stored procedures take parameters whose values differ widely between
      executions of the stored procedure, resulting in different execution
      plans to be created each time. Use of this option is uncommon, and causes
      the stored procedure to execute more slowly because the stored procedure
      must be recompiled each time it is executed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can force the stored procedure to be
      recompiled by specifying the WITH RECOMPILE option when you execute the
      stored procedure. Use this option only if the parameter you are supplying
      is atypical or if the data has significantly changed since the stored
      procedure was created. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;ol start=&quot;61&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find out which stored procedure is recompiling? How to stop
     stored procedures from recompiling? &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;I have Two Stored Procedures SP1 and SP2 as given below. How the
     Transaction works, whether SP2 Transaction succeeds or fails?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE PROCEDURE SP1 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     INSERT INTO MARKS (SID,MARK,CID) VALUES (5,6,3)&lt;br /&gt;
     EXEC SP2&lt;br /&gt;
     ROLLBACK&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     CREATE PROCEDURE SP2 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     INSERT INTO MARKS (SID,MARK,CID) VALUES (100,100,103)&lt;br /&gt;
     commit tran&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Both will get roll backed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE
     PROCEDURE SP1 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO MARKS (SID,MARK,CID) VALUES (5,6,3)&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; BEGIN TRAN&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO STUDENT (SID,NAME1)
     VALUES (1,&#39;SA&#39;)&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; commit tran&lt;br /&gt;
     ROLLBACK TRAN&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Both will get roll backed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you handle Errors in Sql Stored Procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT NonFatal VALUES (@Column2)&lt;br /&gt;
     IF @@ERROR &amp;lt;&amp;gt;0&lt;br /&gt;
     &amp;nbsp;BEGIN&lt;br /&gt;
     &amp;nbsp; PRINT &#39;Error Occured&#39;&lt;br /&gt;
     &amp;nbsp;END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;br /&gt;
     &lt;a href=&quot;http://www.sqlteam.com/item.asp?ItemID=2463&quot;&gt;http://www.sqlteam.com/item.asp?ItemID=2463&lt;/a&gt;
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you raise an error in sql?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;RAISERROR&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - Returns a user-defined error message and sets
     a system flag to record that an error has occurred. Using RAISERROR, the
     client can either retrieve an entry from the sysmessages table or build a
     message dynamically with user-specified severity and state information.
     After the message is defined it is sent back to the client as a server
     error message. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;I
     have a stored procedure like&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;commit tran&lt;br /&gt;
     create table a()&lt;br /&gt;
     insert into table b&lt;br /&gt;
     --&lt;br /&gt;
     --&lt;br /&gt;
     rollback tran&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;what will be the result? Is table
     created? data will be inserted in table b? &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How you will return XML from Stored Procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You use the FOR XML clause of
     the SELECT statement, and within the FOR XML clause you specify an XML
     mode: RAW, AUTO, or EXPLICIT. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can a Stored Procedure call itself (recursive). If so then up to
     what level and can it be control?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Stored procedures are nested
     when one stored procedure calls another. You can nest stored procedures up
     to 32 levels. The nesting level increases by one when the called stored
     procedure begins execution and decreases by one when the called stored
     procedure completes execution. Attempting to exceed the maximum of 32
     levels of nesting causes the whole calling stored procedure chain to fail.
     The current nesting level for the stored procedures in execution is stored
     in the @@NESTLEVEL function.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     eg:&lt;br /&gt;
     SET NOCOUNT ON&lt;br /&gt;
     USE master&lt;br /&gt;
     IF OBJECT_ID(&#39;dbo.sp_calcfactorial&#39;) IS NOT NULL&lt;br /&gt;
     DROP PROC dbo.sp_calcfactorial&lt;br /&gt;
     GO&lt;br /&gt;
     CREATE PROC dbo.sp_calcfactorial&lt;br /&gt;
     @base_number int, @factorial int OUT&lt;br /&gt;
     AS&lt;br /&gt;
     DECLARE @previous_number int&lt;br /&gt;
     IF (@base_number&amp;lt;2) SET @factorial=1 -- Factorial of 0 or 1=1&lt;br /&gt;
     ELSE BEGIN&lt;br /&gt;
     SET @previous_number=@base_number-1&lt;br /&gt;
     EXEC dbo.sp_calcfactorial @previous_number, @factorial OUT -- &lt;b&gt;Recursive&lt;/b&gt;
     call&lt;br /&gt;
     IF (@factorial=-1) RETURN(-1) -- Got an error, return&lt;br /&gt;
     SET @factorial=@factorial*@base_number&lt;br /&gt;
     END&lt;br /&gt;
     RETURN(0)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;calling proc&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;br /&gt;
     DECLARE @factorial int &lt;br /&gt;
     EXEC dbo.sp_calcfactorial 4, @factorial OUT &lt;br /&gt;
     SELECT @factorial&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nested Triggers&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are nested when a
     trigger performs an action that initiates another trigger, which can
     initiate another trigger, and so on. Triggers can be nested up to 32
     levels, and you can control whether triggers can be nested through the
     nested triggers server configuration option. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is an extended stored procedure? Can you instantiate a COM
     object by using T-SQL? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;An extended stored procedure is
     a function within a DLL (written in a programming language like C, C++
     using Open Data Services (ODS) API) that can be called from T-SQL, just
     the way we call normal stored procedures using the EXEC statement. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between view and stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views can have only select
     statements (create, update, truncate, delete statements are not allowed)
     Views cannot have “select into”, “Group by” “Having”, ”Order by” &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a Function &amp;amp; what are the different user defined
     functions?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Function is a saved Transact-SQL
     routine that returns a value. User-defined functions cannot be used to
     perform a set of actions that modify the global database state. User-defined
     functions, like system functions, can be invoked from a query. They also
     can be executed through an EXECUTE statement like stored procedures. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;11&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Scalar Functions&lt;br /&gt;
      Functions are scalar-valued if the RETURNS clause specified one of the
      scalar &lt;u&gt;data types&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Inline Table-valued Functions&lt;br /&gt;
      If the &lt;u&gt;RETURNS clause specifies TABLE&lt;/u&gt; with no accompanying column
      list, the function is an inline function. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Multi-statement Table-valued Functions&lt;br /&gt;
      If the &lt;u&gt;RETURNS clause specifies a TABLE type with columns and their
      data types&lt;/u&gt;, the function is a multi-statement table-valued function. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;73&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the difference between a function and a stored procedure?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions &lt;u&gt;can be used in a select statement&lt;/u&gt;
      where as procedures cannot &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Procedure takes &lt;u&gt;both input and output&lt;/u&gt;
      parameters but Functions takes only input parameters &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions &lt;u&gt;cannot return values of type text,
      ntext, image &amp;amp; timestamps&lt;/u&gt; where as procedures can &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions can be used as user defined datatypes
      in create table but procedures cannot &lt;br /&gt;
      ***Eg:-create table &amp;lt;tablename&amp;gt;(name varchar(10),salary
      getsal(name))&lt;br /&gt;
      Here getsal is a user defined function which returns a salary type, when
      table is created no storage is allotted for salary type, and getsal
      function is also not executed, But when we are fetching some values from
      this table, getsal function get’s executed and the return &lt;br /&gt;
      Type is returned as the result set. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How
     to debug a stored procedure?&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;TRIGGER&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Trigger? What is its use? What are the types of Triggers?
     What are the new kinds of triggers in sql 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are a special class of
     stored procedure &lt;u&gt;defined to execute automatically when an UPDATE,
     INSERT, or DELETE statement is issued against a table or view&lt;/u&gt;.
     Triggers are powerful tools that sites can &lt;u&gt;use to enforce their
     business rules automatically when data is modified&lt;/u&gt;.&lt;br /&gt;
     The CREATE TRIGGER statement can be defined with the FOR UPDATE, FOR
     INSERT, or FOR DELETE clauses to target a trigger to a specific class of
     data modification actions. When FOR UPDATE is specified, the &lt;u&gt;IF UPDATE
     (column_name) clause&lt;/u&gt; can be used to target a trigger to updates
     affecting a particular column.&lt;br /&gt;
     You can use the FOR clause to specify when a trigger is executed: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;AFTER (default) - The trigger &lt;u&gt;executes after
      the statement that triggered it completes&lt;/u&gt;. If the statement fails
      with an error, such as a constraint violation or syntax error, the
      trigger is not executed. AFTER triggers cannot be specified for views. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;INSTEAD OF -The trigger executes in place of the
      triggering action. INSTEAD OF triggers can be specified on both tables
      and views. You can define &lt;u&gt;only one INSTEAD OF trigger for each
      triggering action&lt;/u&gt; (INSERT, UPDATE, and DELETE). INSTEAD OF triggers
      can be used to perform enhance integrity checks on the data values
      supplied in INSERT and UPDATE statements. INSTEAD OF triggers also let
      you specify actions that allow views, which would normally not support
      updates, to be updatable.&lt;br /&gt;
      An INSTEAD OF trigger can take actions such as: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ignoring parts of a batch. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Not processing a part of a batch and logging
       the problem rows. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Taking an alternative action if an error
       condition is encountered. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In SQL Server 6.5 you could
define only 3 triggers per table, one for INSERT, one for UPDATE and one for
DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could
create multiple triggers per each action. But in 7.0 there&#39;s no way to control
the order in which the triggers fire. In SQL Server 2000 you could specify &lt;u&gt;which
trigger fires first or fires last using &lt;/u&gt;&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_settriggerorder&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Till SQL Server 7.0, triggers fire only after the data modification operation
happens. So in a way, they are called post triggers. But in SQL Server 2000 you
could create pre triggers also. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;76&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When should one use &quot;instead of Trigger&quot;? Example&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE BaseTable&lt;br /&gt;
     (&lt;br /&gt;
     PrimaryKey int IDENTITY(1,1),&lt;br /&gt;
     Color nvarchar(10) NOT NULL,&lt;br /&gt;
     Material nvarchar(10) NOT NULL,&lt;br /&gt;
     ComputedCol AS (Color + Material)&lt;br /&gt;
     )&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     --Create a view that contains all columns from the base table.&lt;br /&gt;
     CREATE VIEW InsteadView&lt;br /&gt;
     AS SELECT PrimaryKey, Color, Material, ComputedCol&lt;br /&gt;
     FROM BaseTable&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     --Create an INSTEAD OF INSERT trigger on tthe view.&lt;br /&gt;
     CREATE TRIGGER InsteadTrigger on InsteadView&lt;br /&gt;
     INSTEAD OF INSERT&lt;br /&gt;
     AS&lt;br /&gt;
     BEGIN&lt;br /&gt;
     --Build an INSERT statement ignoring inserrted.PrimaryKey and &lt;br /&gt;
     --inserted.ComputedCol.&lt;br /&gt;
     INSERT INTO BaseTable&lt;br /&gt;
     SELECT Color, Material&lt;br /&gt;
     FROM inserted&lt;br /&gt;
     END&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     -- can insert value to basetable by this insert into
     basetable(color,material) values (&#39;red&#39;,&#39;abc&#39;)&lt;br /&gt;
     &lt;br /&gt;
     -- insert into InsteadView(color,material)) values (&#39;red&#39;,&#39;abc&#39;) can&#39;t do
     this.&lt;br /&gt;
     -- It will give error &quot;&#39;PrimaryKey&#39; iin table &#39;InsteadView&#39; cannot be
     null.&quot;&lt;br /&gt;
     &lt;br /&gt;
     -- can insert value through table by this&amp;lt;&lt;br /&gt;
     insert into InsteadView values (1,&#39;red&#39;,&#39;abc&#39;,1) --PrimaryKey, ComputedCol
     wont take values from here&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between trigger and stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Trigger will get execute
     automatically when an UPDATE, INSERT, or DELETE statement is issued
     against a table or view.&lt;br /&gt;
     We have to call stored procedure manually, or it can execute automatic
     when the SQL Server starts (You can use the &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_procoption&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; system stored procedure to mark the stored
     procedure to automatic execution when the SQL Server will start. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The following trigger generates an e-mail whenever a new title is
     added.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TRIGGER reminder&lt;br /&gt;
     ON titles&lt;br /&gt;
     FOR INSERT&lt;br /&gt;
     AS&lt;br /&gt;
     EXEC master..xp_sendmail &#39;MaryM&#39;, &#39;New title, mention in the next report
     to distributors.&#39;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Drawback of trigger? Its alternative solution?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are generally used to
     implement business rules, auditing. Triggers can also be used to extend
     the referential integrity checks, but wherever possible, use constraints
     for this purpose, instead of triggers, as constraints are much faster.&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;LOCK&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server™ 2000 uses
     locking to ensure transactional integrity and database consistency.
     Locking prevents users from reading data being changed by other users, and
     prevents multiple users from changing the same data at the same time. If
     locking is not used, data within the database may become logically
     incorrect, and queries executed against that data may produce unexpected
     results. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different types of locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server uses these resource
     lock modes. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Lock mode&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Shared (S)&lt;/span&gt;&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used for operations that do
  not change or update data (read-only operations), such as a SELECT statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Update (U)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used on resources that can
  be updated. Prevents a common form of deadlock that occurs when multiple
  sessions are reading, locking, and potentially updating resources later.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Exclusive (X)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used for data-modification
  operations, such as INSERT, UPDATE, or DELETE. Ensures that multiple updates
  cannot be made to the same resource at the same time.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Intent&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used to establish a lock
  hierarchy. The types of intent locks are: intent shared (IS), intent
  exclusive (IX), and shared with intent exclusive (SIX).&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Schema&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used when an operation
  dependent on the schema of a table is executing. The types of schema locks
  are: schema modification (Sch-M) and schema stability (Sch-S). &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bulk Update (BU)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used when bulk-copying data
  into a table and the TABLOCK hint is specified.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;82&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a dead lock? Give a practical sample? How you can minimize
     the deadlock situation? What is a deadlock and what is a live lock? How
     will you go about resolving deadlocks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Deadlock is a situation when two
     processes, &lt;u&gt;each having a lock on one piece of data, attempt to acquire
     a lock on the other&#39;s piece&lt;/u&gt;. Each process&amp;nbsp; would wait
     indefinitely for the other to release the lock, unless one of the user
     processes is terminated. SQL Server detects deadlocks and terminates one
     user&#39;s process.&lt;br /&gt;
     A livelock is one, where a&amp;nbsp;&lt;u&gt;request for an exclusive lock is
     repeatedly denied because a series of overlapping shared locks keeps
     interfering&lt;/u&gt;. SQL Server detects the situation after four denials and &lt;u&gt;refuses
     further shared locks&lt;/u&gt;. (A livelock also occurs when read transactions
     monopolize a table or page, forcing a write transaction to wait
     indefinitely.) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is isolation level?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;An isolation level determines
     the degree of isolation of data between concurrent transactions. The
     default SQL Server isolation level is Read Committed. A lower isolation
     level increases concurrency, but at the expense of data correctness.
     Conversely, a higher isolation level ensures that data is correct, but can
     affect concurrency negatively. The isolation level required by an
     application determines the locking behavior SQL Server uses.&lt;br /&gt;
     SQL-92 defines the following isolation levels, all of which are supported
     by SQL Server: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read uncommitted (the lowest level where
      transactions are isolated only enough to ensure that physically corrupt
      data is not read). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read committed (SQL Server default level). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Repeatable read. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Serializable (the highest level, where
      transactions are completely isolated from one another). &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 352.2pt;&quot; width=&quot;470&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Isolation level&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dirty read&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nonrepeatable read&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Phantom&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read uncommitted&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read committed&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Repeatable read&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Serializable&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;84&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Uncommitted Dependency (Dirty Read)&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - Uncommitted dependency occurs when a second
     transaction selects a row that is being updated by another transaction.
     The second transaction is reading data that has not been committed yet and
     may be changed by the transaction updating the row. For example, an editor
     is making changes to an electronic document. During the changes, a second
     editor takes a copy of the document that includes all the changes made so
     far, and distributes the document to the intended audience.&lt;br /&gt;
     &lt;u&gt;Inconsistent Analysis (Nonrepeatable Read)&lt;/u&gt; Inconsistent analysis
     occurs when a second transaction accesses the same row several times and
     reads different data each time. Inconsistent analysis is similar to
     uncommitted dependency in that another transaction is changing the data
     that a second transaction is reading. However, in inconsistent analysis,
     the data read by the second transaction was committed by the transaction
     that made the change. Also, inconsistent analysis involves multiple reads
     (two or more) of the same row and each time the information is changed by
     another transaction; thus, the term nonrepeatable read. For example, an
     editor reads the same document twice, but between each reading, the writer
     rewrites the document. When the editor reads the document for the second
     time, it has changed.&lt;br /&gt;
     &lt;u&gt;Phantom Reads&lt;/u&gt; Phantom reads occur when an insert or delete action
     is performed against a row that belongs to a range of rows being read by a
     transaction. The transaction&#39;s first read of the range of rows shows a row
     that no longer exists in the second or succeeding read, as a result of a
     deletion by a different transaction. Similarly, as the result of an insert
     by a different transaction, the transaction&#39;s second or succeeding read
     shows a row that did not exist in the original read. For example, an
     editor makes changes to a document submitted by a writer, but when the
     changes are incorporated into the master copy of the document by the
     production department, they find that new unedited material has been added
     to the document by the author. This problem could be avoided if no one
     could add new material to the document until the editor and production
     department finish working with the original document. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;nolock? What is the difference between the REPEATABLE READ and
     SERIALIZE isolation levels?&lt;br /&gt;
     Locking Hints - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A range of
     table-level locking hints can be specified using the SELECT, INSERT,
     UPDATE, and DELETE statements to direct Microsoft® SQL Server 2000 to the
     type of locks to be used. Table-level locking hints can be used when a
     finer control of the types of locks acquired on an object is required.
     These locking hints override the current transaction isolation level for
     the session. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 80.0%;&quot; width=&quot;80%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Locking hint&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;HOLDLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Hold a shared lock until
  completion of the transaction instead of releasing the lock as soon as the
  required table, row, or data page is no longer required. HOLDLOCK is
  equivalent to SERIALIZABLE.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;NOLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Do not issue shared locks
  and do not honor exclusive locks. When this option is in effect, it is
  possible to read an uncommitted transaction or a set of pages that are rolled
  back in the middle of a read. Dirty reads are possible. Only applies to the
  SELECT statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;PAGLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use page locks where a
  single table lock would usually be taken.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READCOMMITTED&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the READ COMMITTED
  isolation level. By default, SQL Server 2000 operates at this isolation
  level.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READPAST&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Skip locked rows. This
  option causes a transaction to skip rows locked by other transactions that
  would ordinarily appear in the result set, rather than block the transaction
  waiting for the other transactions to release their locks on these rows. The
  READPAST lock hint applies only to transactions operating at READ COMMITTED
  isolation and will read only past row-level locks. Applies only to the SELECT
  statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READUNCOMMITTED&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Equivalent to NOLOCK.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;REPEATABLEREAD&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the REPEATABLE READ
  isolation level. &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ROWLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use row-level locks instead
  of the coarser-grained page- and table-level locks.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SERIALIZABLE&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the SERIALIZABLE isolation
  level. Equivalent to HOLDLOCK.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TABLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use a table lock instead of
  the finer-grained row- or page-level locks. SQL Server holds this lock until
  the end of the statement. However, if you also specify HOLDLOCK, the lock is
  held until the end of the transaction.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TABLOCKX&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use an exclusive lock on a
  table. This lock prevents others from reading or updating the table and is
  held until the end of the statement or transaction.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;UPDLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use update locks instead of
  shared locks while reading a table, and hold locks until the end of the
  statement or transaction. UPDLOCK has the advantage of allowing you to read
  data (without blocking other readers) and update it later with the assurance
  that the data has not changed since you last read it.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;XLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use an exclusive lock that
  will be held until the end of the transaction on all data processed by the
  statement. This lock can be specified with either PAGLOCK or TABLOCK, in
  which case the exclusive lock applies to the appropriate level of
  granularity.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;86&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;For
     example, if the transaction isolation level is set to SERIALIZABLE, and
     the table-level locking hint NOLOCK is used with the SELECT statement,
     key-range locks typically used to maintain serializable transactions are
     not taken.&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     SET TRANSACTION ISOLATION LEVEL SERIALIZABLE&lt;br /&gt;
     GO&lt;br /&gt;
     BEGIN TRANSACTION&lt;br /&gt;
     SELECT au_lname FROM authors WITH (NOLOCK)&lt;br /&gt;
     GO&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is escalation of locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Lock escalation is the process
     of converting a lot of low level locks (like row locks, page locks) into
     higher level locks (like table locks). Every lock is a memory structure
     too many locks would mean, more memory being occupied by locks. To prevent
     this from happening, SQL Server escalates the many fine-grain locks to
     fewer coarse-grain locks. Lock escalation threshold was definable in SQL
     Server 6.5, but from SQL Server 7.0 onwards it&#39;s dynamically managed by
     SQL Server.&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;VIEW&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is View? Use? Syntax of View?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A view is a virtual table made
     up of data from base tables and other views, but not stored separately. &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views simplify users perception of the database
      (can be used to present only the necessary information while hiding
      details in underlying relations) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views improve data security preventing undesired
      accesses &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views facilite the provision of additional data
      independence &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Does the View occupy memory space?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can u drop a table if it has a view?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views or tables participating in
     a view created &lt;u&gt;with the SCHEMABINDING clause cannot be dropped&lt;/u&gt;. If
     the view is not created using SCHEMABINDING, then we can drop the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Why doesn&#39;t SQL Server permit an ORDER BY clause in the definition
     of a view?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server excludes an ORDER BY
     clause from a view to comply with the ANSI SQL-92 standard. Because
     analyzing the rationale for this standard requires a discussion of the
     underlying structure of the structured query language (SQL) and the
     mathematics upon which it is based, we can&#39;t fully explain the restriction
     here. However, if you need to be able to specify an ORDER BY clause in a
     view, consider using the following workaround:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO &lt;br /&gt;
     CREATE VIEW AuthorsByName&lt;br /&gt;
     AS&lt;br /&gt;
     SELECT TOP 100 PERCENT *&lt;br /&gt;
     FROM authors &lt;br /&gt;
     ORDER BY au_lname, au_fname&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The TOP construct, which Microsoft
     introduced in SQL Server 7.0, is most useful when you combine it with the
     ORDER BY clause. The only time that SQL Server supports an ORDER BY clause
     in a view is when it is used in conjunction with the TOP keyword. (Note
     that the TOP keyword is a SQL Server extension to the ANSI SQL-92
     standard.)&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;TRANSACTION&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Transaction?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A transaction is a sequence of
     operations performed as a single logical unit of work. A logical unit of
     work must exhibit four properties, called the ACID (Atomicity, Consistency,
     Isolation, and Durability) properties, to qualify as a transaction: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Atomicity - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A transaction must be an atomic unit of work; &lt;u&gt;either all of
      its data modifications are performed or none &lt;/u&gt;of them is performed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Consistency - &lt;/span&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When completed, a transaction must leave all
      data in a consistent&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; state. In
      a relational database, all rules must be applied to the transaction&#39;s
      modifications to maintain all data integrity. All internal data
      structures, such as B-tree indexes or doubly-linked lists, must be correct
      at the end of the transaction. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Isolation - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Modifications &lt;u&gt;made by concurrent transactions must be isolated&lt;/u&gt;
      from the modifications made by any other concurrent transactions. A
      transaction either sees data in the state it was in before another
      concurrent transaction modified it, or it sees the data after the second
      transaction has completed, but it does not see an intermediate state.
      This is referred to as serializability because it results in the ability
      to reload the starting data and replay a series of transactions to end up
      with the data in the same state it was in after the original transactions
      were performed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Durability - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After a transaction has completed, its &lt;u&gt;effects are permanently&lt;/u&gt;
      in place in the system. The modifications persist even in the event of a
      system failure. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After one Begin Transaction a truncate statement and a RollBack
     statements are there.&amp;nbsp;Will it be rollbacked? Since the truncate
     statement does not perform logged operation how does it RollBack?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It will rollback.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given
     a SQL like &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Commit Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     RollBack&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     RollBack&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     What is the value of @@Rowcount at each stmt levels?&lt;br /&gt;
     Ans : 0 – zero.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@ROWCOUNT&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
     Returns the number of rows affected by the last statement.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@TRANCOUNT&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
     Returns the number of active transactions for the current connection.&lt;br /&gt;
     Each Begin Tran will add count, each commit will reduce count and ONE
     rollback will make it 0.&lt;br /&gt;
     &lt;br /&gt;
     OTHER &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the constraints for Table Constraints define rules
     regarding the values allowed in columns and are the standard mechanism for
     enforcing integrity. SQL Server 2000 supports five classes of constraints.&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;NOT NULL&lt;br /&gt;
     CHECK&lt;br /&gt;
     UNIQUE&lt;br /&gt;
     PRIMARY KEY&lt;br /&gt;
     FOREIGN KEY&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are 50 columns in a table. Write a query to get first 25
     columns&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ans: Need to mention each column
     names. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to list all the tables in a particular database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     sp_help&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are cursors? Explain different types of cursors. What are the
     disadvantages of cursors? How can you avoid cursors?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Cursors allow row-by-row
     processing of the result sets.&lt;br /&gt;
     &lt;u&gt;Types&lt;/u&gt; of cursors: Static, Dynamic, Forward-only, Keyset-driven.&lt;br /&gt;
     &lt;u&gt;Disadvantages&lt;/u&gt; of cursors: Each time you fetch a row from the
     cursor, it results in a network roundtrip. Cursors are also costly because
     they require more resources and temporary storage (results in more IO
     operations). Further, there are restrictions on the SELECT statements that
     can be used with some types of cursors.&lt;br /&gt;
     &lt;u&gt;How to avoid cursor:&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Most of the times, set based operations can be
      used instead of cursors. Here is an example: If you have to give a flat
      hike to your employees using the following criteria:&lt;br /&gt;
      Salary between 30000 and 40000 -- 5000 hike&lt;br /&gt;
      Salary between 40000 and 55000 -- 7000 hike&lt;br /&gt;
      Salary between 55000 and 65000 -- 9000 hike&lt;br /&gt;
      In this situation many developers tend to use a cursor, determine each
      employee&#39;s salary and update his salary according to the above formula.
      But the same can be achieved by multiple update statements or can be
      combined in a single UPDATE statement as shown below:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
      UPDATE tbl_emp SET salary =&lt;br /&gt;
      CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000&lt;br /&gt;
      WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000&lt;br /&gt;
      WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000&lt;br /&gt;
      END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You need to call a stored procedure when a
      column in a particular row meets certain condition. You don&#39;t have to use
      cursors for this. This can be achieved using WHILE loop, as long as there
      is a unique key to identify each row. For examples of using WHILE loop
      for row by row processing, check out the &#39;My code library&#39; section of my
      site or search for WHILE. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Dynamic Cursor? Suppose, I have a dynamic cursor attached
     to table in a database.&amp;nbsp; I have another means by which I will modify
     the table.&amp;nbsp; What do you think will the values in the cursor be?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dynamic cursors reflect all
     changes made to the rows in their result set when scrolling through the
     cursor. The data values, order, and membership of the rows in the result
     set can change on each fetch. All UPDATE, INSERT, and DELETE statements
     made by all users are visible through the cursor. Updates are visible
     immediately if they are made through the cursor using either an API
     function such as SQLSetPos or the Transact-SQL WHERE CURRENT OF clause.
     Updates made outside the cursor are not visible until they are committed,
     unless the cursor transaction isolation level is set to read uncommitted. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DATEPART?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Returns an integer representing
     the specified datepart of the specified date. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between Delete and Truncate?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TRUNCATE TABLE is functionally
     identical to DELETE statement with no WHERE clause: both remove all rows
     in the table.&lt;br /&gt;
     (1) But TRUNCATE TABLE is faster and uses fewer system and transaction log
     resources than DELETE. The DELETE statement removes rows &lt;u&gt;one at a time
     and records an entry in the transaction log&lt;/u&gt; for each deleted row.
     TRUNCATE TABLE removes the data by deallocating the data pages used to
     store the table&#39;s data, and &lt;u&gt;only the page deallocations&lt;/u&gt; are
     recorded in the transaction log.&lt;br /&gt;
     (2) Because TRUNCATE TABLE is not logged, it &lt;u&gt;cannot activate a trigger&lt;/u&gt;.&lt;br /&gt;
     (3) The &lt;u&gt;counter&lt;/u&gt; used by an identity for new rows is &lt;u&gt;reset&lt;/u&gt; to
     the seed for the column. If you want to retain the identity counter, use
     DELETE instead.&lt;br /&gt;
     Of course, TRUNCATE TABLE can be rolled back. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are global variables? Tell me some of them?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transact-SQL global variables
     are a form of function and are now referred to as functions.&lt;br /&gt;
     ABS - Returns the absolute, positive value of the given numeric
     expression.&lt;br /&gt;
     SUM&lt;br /&gt;
     AVG&lt;br /&gt;
     AND &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DDL?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data definition language (DDL)
     statements are SQL statements that support the definition or declaration
     of database objects (for example, CREATE TABLE, DROP TABLE, and ALTER
     TABLE).&lt;br /&gt;
     You can use the ADO Command object to issue DDL statements. To
     differentiate DDL statements from a table or stored procedure name, set
     the CommandType property of the Command object to adCmdText. Because
     executing DDL queries with this method does not generate any recordsets,
     there is no need for a Recordset object. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DML?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data Manipulation Language
     (DML), which is used to select, insert, update, and delete data in the
     objects defined using DDL &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are keys in RDBMS? What is a primary key/ foreign key?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are two kinds of keys.&lt;br /&gt;
     A primary key is a set of columns from a table that are guaranteed to have
     unique values for each row of that table.&lt;br /&gt;
     Foreign keys are attributes of one table that have matching values in a &lt;b&gt;primary
     key&lt;/b&gt; in another table, allowing for relationships between tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between Primary Key and Unique Key?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Both primary key and unique key
     enforce uniqueness of the column on which they are defined. But by default
     primary key creates a &lt;u&gt;clustered index&lt;/u&gt; on the column, where are
     unique creates a &lt;u&gt;nonclustered index by default&lt;/u&gt;. Another major
     difference is that, primary key &lt;u&gt;doesn&#39;t allow NULLs&lt;/u&gt;, but unique key
     &lt;u&gt;allows one NULL&lt;/u&gt; only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Define candidate key, alternate key, composite key?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     A &lt;u&gt;candidate key is one that can identify each row of a table uniquely&lt;/u&gt;.
     Generally a candidate key becomes the primary key of the table. If the
     table has more than one candidate key, one of them will become the primary
     key, and the rest are called alternate keys. &lt;br /&gt;
     A key formed by combining at least two or more columns is called composite
     key. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the Referential Integrity?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Referential integrity refers to
     the consistency that must be maintained between primary and foreign keys,
     i.e. every foreign key value must have a corresponding primary key value. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are defaults? Is there a column to which a default can&#39;t be
     bound?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     A default is a value that will be used by a column, if no value is
     supplied to that column while inserting data. IDENTITY columns and
     timestamp columns can&#39;t have defaults bound to them. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Query optimization? How is tuning a performance of query
     done? &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the use of shell commands? xp_cmdshell&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Executes a given command string
     as an operating-system command shell and returns any output as rows of
     text. Grants nonadministrative users permissions to execute &lt;b&gt;xp_cmdshell&lt;/b&gt;.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is use of shrink database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server 2000
     allows &lt;u&gt;each file within a database to be shrunk to remove unused pages&lt;/u&gt;.
     Both data and transaction log files can be shrunk. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If the performance of the query suddenly decreased where you will
     check?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a pass-through query?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server 2000 sends
     pass-through queries as un-interpreted query strings to an OLE DB data
     source. The query must be in a syntax the OLE DB data source will accept.
     A Transact-SQL statement uses the results from a pass-through query as
     though it is a regular table reference.&lt;br /&gt;
     This example uses a pass-through query to retrieve a result set from a
     Microsoft Access version of the Northwind sample database.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM OpenRowset(&#39;Microsoft.Jet.OLEDB.4.0&#39;, &lt;br /&gt;
     &#39;c:\northwind.mdb&#39;;&#39;admin&#39;; &#39;&#39;, &lt;br /&gt;
     &#39;SELECT CustomerID, CompanyName&lt;br /&gt;
     FROM Customers&lt;br /&gt;
     WHERE Region = &#39;&#39;WA&#39;&#39; &#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you differentiate Local and Global Temporary table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can create local and global
     temporary tables. Local temporary tables are visible only in the current
     session; global temporary tables are visible to all sessions. Prefix local
     temporary table names with single number sign (#&lt;i&gt;table_name&lt;/i&gt;), and
     prefix global temporary table names with a double number sign (##&lt;i&gt;table_name&lt;/i&gt;).
     SQL statements reference the temporary table using the value specified for
     &lt;i&gt;table_name&lt;/i&gt; in the CREATE TABLE statement:&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE #MyTempTable (cola INT PRIMARY KEY)&lt;br /&gt;
     INSERT INTO #MyTempTable VALUES (1) &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How the Exists keyword works in SQL Server?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;USE pubs&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;code&gt;SELECT au_lname, au_fname&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;FROM authors&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;WHERE exists&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; (SELECT *&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; FROM publishers&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; WHERE authors.city = publishers.city)&lt;/code&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When a subquery is introduced with
     the keyword EXISTS, it functions as an existence test. The WHERE clause of
     the outer query tests for the existence of rows returned by the subquery.
     The subquery &lt;u&gt;does not actually produce any data; it returns a value of
     TRUE or FALSE&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ANY?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     SELECT au_lname, au_fname&lt;br /&gt;
     FROM authors&lt;br /&gt;
     WHERE city = ANY&lt;br /&gt;
     (SELECT city&lt;br /&gt;
     FROM publishers) &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;to select date part only&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CONVERT(char(10),GetDate(),101)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;--to select time part only&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT right(GetDate(),7)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I send a message to user from the SQL Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the xp_cmdshell
     extended stored procedure to run net send command. This is the example to
     send the &#39;Hello&#39; message to JOHN:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC master..xp_cmdshell &quot;net send JOHN
     &#39;Hello&#39;&quot;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To get net send message on the
     Windows 9x machines, you should run the WinPopup utility. You can place
     WinPopup in the Startup group under Program Files. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is normalization? Explain different levels of normalization?
     Explain Third normalization form with an example?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The process of refining tables,
     keys, columns, and relationships to create an efficient database is called
     &lt;i&gt;normalization&lt;/i&gt;. This should eliminates unnecessary duplication and
     provides a rapid search path to all necessary information.&lt;br /&gt;
     Some of the benefits of normalization are: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data integrity (because there is no redundant,
      neglected data) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Optimized queries (because normalized tables
      produce rapid, efficient joins) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Faster index creation and sorting (because the
      tables have fewer columns) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Faster UPDATE performance (because there are
      fewer indexes per table) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Improved concurrency resolution (because table
      locks will affect less data) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate redundancy &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are a few rules for
database normalization. Each rule is called a &quot;normal form.&quot; If the
first rule is observed, the database is said to be in &quot;first normal
form.&quot; If the first three rules are observed, the database is considered
to be in &quot;third normal form.&quot; Although other levels of normalization
are possible, third normal form is considered the highest level necessary for
most applications. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;First
      Normal Form (1NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate repeating groups&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; in individual tables &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create a &lt;u&gt;separate table for each set of
       related data&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identify each set of related data with a &lt;u&gt;primary
       key&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Do not use multiple fields in
a single table to store similar data. &lt;br /&gt;
Example &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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate1 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate2 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate3 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate4 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Beth &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jason &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Carol &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &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;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate duplicative columns
from the same table.&amp;nbsp; Clearly, the Subordinate1-Subordinate4 columns are
duplicative. What happens when we need to add or remove a subordinate? &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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinates&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim, Mary, Beth&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike, Jason, Carol, Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan&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;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;This solution is closer, but
it also falls short of the mark. The subordinates column is still duplicative
and non-atomic. What happens when we need to add or remove a subordinate? We
need to read and write the entire contents of the table. That’s not a big deal
in this situation, but what if one manager had one hundred employees? Also, it
complicates the process of selecting data from the database in future queries. &lt;br /&gt;
Solution:&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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in; width: 113.4pt;&quot; width=&quot;151&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Beth &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jason &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Carol &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;2&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Second
      Normal Form (2NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create &lt;u&gt;separate tables for sets of values
       that apply to multiple records.&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Relate these tables with a&lt;u&gt; foreign key&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Records should not depend on
anything other than a table&#39;s primary key (a compound key, if necessary). &lt;br /&gt;
For example, consider a customer&#39;s address in an accounting system. The address
is needed by the Customers table, but also by the Orders, Shipping, Invoices,
Accounts Receivable, and Collections tables. Instead of storing the customer&#39;s
address as a separate entry in each of these tables, store it in one place,
either in the Customers table or in a separate Addresses table. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;3&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Third
      Normal Form (3NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate fields that do not depend on the key&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Values in a record that are
not part of that record&#39;s key do not belong in the table. In general, any time
the contents of a group of fields may apply to more than a single record in the
table, consider placing those fields in a separate table.&lt;br /&gt;
For example, in an Employee Recruitment table, a candidate&#39;s university name
and address may be included. But you need a complete list of universities for
group mailings. If university information is stored in the Candidates table,
there is no way to list universities with no current candidates. Create a
separate Universities table and link it to the Candidates table with a
university code key.&lt;br /&gt;
Another Example : &lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.55in;&quot; width=&quot;437&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MemberId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Company&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CompanyLoc&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; height: .15in; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;John Smith&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ABC&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alabama&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; height: .15in; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dave Jones&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MCI&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Florida&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Member table
satisfies first normal form - it contains no repeating groups. It satisfies
second normal form - since it doesn&#39;t have a multivalued key. But the key is
MemberID, and the company name and location describe only a company, not a
member. To achieve third normal form, they must be moved into a separate table.
Since they describe a company, CompanyCode becomes the key of the new
&quot;Company&quot; table.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The motivation for
this is the same for second normal form: we want to avoid update and delete
anomalies. For example, suppose no members from the IBM were currently stored
in the database. With the previous design, there would be no record of its
existence, even though 20 past members were from IBM!&lt;br /&gt;
&lt;u&gt;Member Table &lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.05in;&quot; width=&quot;389&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MemberId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CID&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;John Smith&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dave Jones&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
&lt;u&gt;Company Table &lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.05in;&quot; width=&quot;389&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Location&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ABC&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alabama&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MCI&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Florida&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;4&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Boyce-Codd
      Normal Form (BCNF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A relation is in Boyce/Codd
      normal form if and only if the only determinants are candidate key. Its a
      different version of 3NF, indeed, was meant to replace it. [A determinant
      is any attribute on which some other attribute is (fully) functionally
      dependent.] &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;4th
      Normal Form (4NF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table is in 4NF if it is in
      BCNF and if it has no multi-valued dependencies. This applies primarily
      to key-only associative tables, and appears as a ternary relationship,
      but has incorrectly merged 2 distinct, independent relationships.&lt;br /&gt;
      Eg: This could be any 2 M:M relationships from a single entity. For
      instance, a member could know many software tools, and a software tool
      may be used by many members. Also, a member could have recommended many
      books, and a book could be recommended by many members. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-bottom-alt: .25pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: outset; mso-border-top-alt: .25pt; mso-padding-alt: 0in 0in 0in 0in; width: 60.0%;&quot; width=&quot;60%&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 20.0%;&quot; width=&quot;20%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Software&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 8.0%;&quot; width=&quot;8%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 32.0%;&quot; width=&quot;32%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;member&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 8.0%;&quot; width=&quot;8%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 32.0%;&quot; width=&quot;32%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Book&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;6&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The correct
      solution, to cause the model to be in 4th normal form, is to ensure that
      all M:M relationships are resolved independently if they are indeed
      independent.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-bottom-alt: .25pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: outset; mso-border-top-alt: .25pt; mso-padding-alt: 0in 0in 0in 0in; width: 349.8pt;&quot; width=&quot;466&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 43.8pt;&quot; width=&quot;58&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Software&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 16.2pt;&quot; width=&quot;22&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 1.0in;&quot; width=&quot;96&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;membersoftware&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 16.8pt;&quot; width=&quot;22&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 44.4pt;&quot; width=&quot;59&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;member&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 27.0pt;&quot; width=&quot;36&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 54.6pt;&quot; width=&quot;73&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;memberBook&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 24.6pt;&quot; width=&quot;33&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 44.4pt;&quot; width=&quot;59&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;book&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;7&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;5th
      Normal Form (5NF)(PJNF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table is in 5NF, also called
      &quot;Projection-Join Normal Form&quot;, if it is in 4NF and if every
      join dependency in the table is a consequence of the candidate keys of
      the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Domain/key
      normal form (DKNF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;. A key
      uniquely identifies each row in a table. A domain is the set of
      permissible values for an attribute. By enforcing key and domain
      restrictions, the database is assured of being freed from modification
      anomalies. DKNF is the normalization level that most designers aim to
      achieve. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Remember, these normalization
guidelines are cumulative.&amp;nbsp; For a database to be in 2NF, it must first
fulfill all the criteria of a 1NF database. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;121&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If a database is normalized by 3 NF then how many number of tables
     it should contain in minimum? How many minimum if 2NF and 1 NF?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is denormalization and when would you go for it?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;As the name indicates,
     denormalization is the reverse process of normalization. It&#39;s the controlled
     introduction of redundancy in to the database design. It helps &lt;u&gt;improve
     the query performance&lt;/u&gt; &lt;u&gt;as the number of joins could be reduced&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I randomly sort query results? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To randomly order rows, or to
     return &lt;i&gt;x&lt;/i&gt; number of randomly chosen rows, you can use the RAND
     function inside the SELECT statement. But the RAND function is resolved
     only once for the entire query, so every row will get same value. You can
     use an ORDER BY clause to sort the rows by the result from the NEWID
     function, as the following code shows:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM Northwind..Orders &lt;br /&gt;
     ORDER BY NEWID()&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_who&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Provides information about
     current Microsoft® SQL Server™ users and processes. The information
     returned can be filtered to return only those processes that are not idle.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Have you worked on Dynamic SQL? How will You handled “ (Double
     Quotes) in Dynamic SQL?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find dependents of a table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Verify dependencies with &lt;b&gt;sp_depends&lt;/b&gt;
     before dropping an object &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between a CONSTRAINT AND RULE?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Rules are a
     backward-compatibility feature that perform some of the same functions as
     CHECK constraints. CHECK constraints are the preferred, standard way to
     restrict the values in a column. CHECK constraints are also more concise
     than rules; there can only be one rule applied to a column, but multiple
     CHECK constraints can be applied. CHECK constraints are specified as part
     of the CREATE TABLE statement, while rules are created as separate objects
     and then bound to the column. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to call a COM dll from SQL Server 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_OACreate - Creates an
     instance of the OLE object on an instance of Microsoft® SQL Server&lt;br /&gt;
     &lt;b&gt;Syntax&lt;br /&gt;
     sp_OACreate&lt;/b&gt; &lt;i&gt;progid&lt;/i&gt;&lt;b&gt;, &lt;/b&gt;| &lt;i&gt;clsid&lt;/i&gt;&lt;b&gt;, &lt;/b&gt;&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;objecttoken&lt;/i&gt; &lt;b&gt;OUTPUT&lt;/b&gt; &lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ &lt;b&gt;,&lt;/b&gt; &lt;i&gt;context &lt;/i&gt;] &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;context - &lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies the execution context in which the newly
created OLE object runs. If specified, this value must be one of the following:&lt;b&gt;&lt;br /&gt;
1&lt;/b&gt; = In-process (.dll) OLE server only&lt;br /&gt;
&lt;b&gt;4&lt;/b&gt; = Local (.exe) OLE server only&lt;br /&gt;
&lt;b&gt;5&lt;/b&gt; = Both in-process and local OLE server allowed&lt;/span&gt;&lt;/div&gt;
&lt;h5 style=&quot;margin-left: .5in;&quot;&gt;
Examples&lt;/h5&gt;
&lt;h6 style=&quot;margin-left: .5in;&quot;&gt;
A. Use Prog ID - This example creates a SQL-DMO
SQLServer object by using its ProgID.&lt;/h6&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @object int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @hr int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @src varchar(255), @desc varchar(255)&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;EXEC @hr = sp_OACreate &#39;SQLDMO.SQLServer&#39;, @object OUT&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;IF @hr &amp;lt;&amp;gt; 0&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;BEGIN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT &lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;RETURN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;END&lt;/code&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;B. Use CLSID - This
example creates a SQL-DMO SQLServer object by using its CLSID.&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @object int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @hr int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @src varchar(255), @desc varchar(255)&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;EXEC @hr = sp_OACreate &#39;{00026BA1-0000-0000-C000-000000000046}&#39;,&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@object OUT&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;IF @hr &amp;lt;&amp;gt; 0&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;BEGIN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT &lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;RETURN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;END&lt;/code&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;ol start=&quot;129&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between sysusers and syslogins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sysusers - Contains one row for
     each Microsoft® Windows user, Windows group, Microsoft SQL Server™ user,
     or SQL Server role in the database.&lt;br /&gt;
     syslogins - Contains one row for each login account. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the row size in SQL Server 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;8060 bytes. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you find structure of table, all &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tables/views &lt;b&gt;in one db, all dbs?&lt;br /&gt;
     &lt;/b&gt;//structure of table&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb tbl_emp&lt;br /&gt;
     &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     //&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;list of all databases&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM master.dbo.sysdatabases&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;//details about database pubs. .mdf,
     .ldf file locations, size of database&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb pubs&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;//lists all tables under current
     database&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_tables&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM information_schema.tables WHERE
     (table_type = &#39;base table&#39;)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM sysobjects WHERE type = &#39;U&#39; //faster&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;B-tree indexes or doubly-linked lists?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the system function to get the current user&#39;s user id? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;USER_ID(). Also check out other
     system functions like USER_NAME(), SYSTEM_USER, SESSION_USER,
     CURRENT_USER, USER, SUSER_SID(), HOST_NAME(). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the series of steps that happen on execution of a query
     in a Query Analyzer?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1) Syntax checking 2) Parsing 3)
     Execution plan &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Which event (Check constraints, Foreign Key, Rule, trigger,
     Primary key check) will be performed last for integrity check?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identity Insert Check&lt;br /&gt;
     Nullability constraint&lt;br /&gt;
     Data type check&lt;br /&gt;
     Instead of trigger&lt;br /&gt;
     Primary key&lt;br /&gt;
     Check constraint&lt;br /&gt;
     Foreign key&lt;br /&gt;
     DML Execution (update statements)&lt;br /&gt;
     After Trigger&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you show many to many relation in sql?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create 3rd table with 2 columns
     which having one to many relation to these tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When a query is sent to the database and an index is not being
     used, what type of execution is taking place?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table scan. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is #, ##, @, @@ means?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;@@ - System variables&lt;br /&gt;
     @ - user defined variables &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between a Local temporary table and a
     Global temporary table? How is each one denoted?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Local temporary table will be
     accessible to only current user session, its name will be preceded with a
     single hash (#mytable)&lt;br /&gt;
     Global temporary table will be accessible to all users, &amp;amp; it will be
     dropped only after ending of all active connections, its name will be
     preceded with double hash (##mytable) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is covered queries in SQL Server?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is HASH JOIN, MERGE JOIN?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;b&gt;TOOLS&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;142.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Have you ever used DBCC command? Give an example for it.&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Transact-SQL programming language
provides DBCC statements that act as Database Console Commands for Microsoft®
SQL Serve 2000. These statements check the physical and logical consistency of
a database. Many DBCC statements can fix detected problems. Database Console
Command statements are grouped into these categories.&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 471.0pt;&quot; width=&quot;628&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Statement category&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Maintenance statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Maintenance tasks on a
  database, index, or filegroup. &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Miscellaneous statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Miscellaneous tasks such as
  enabling row-level locking or removing a dynamic-link library (DLL) from
  memory.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Status statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Status checks.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Validation statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Validation operations on a
  database, table, index, catalog, filegroup, system tables, or allocation of
  database pages.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 6.45in;&quot; valign=&quot;top&quot; width=&quot;619&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;DBCC CHECKDB, DBCC
  CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC, DBCC SHOWCONTIG, DBCC
  SHRINKDATABASE, DBCC SHRINKFILE etc.&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;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol start=&quot;143&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the output of DBCC Showcontig statement?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Displays fragmentation
     information for the data and indexes of the specified table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do I reset the identity column?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the DBCC CHECKIDENT
     statement, if you want to reset or reseed the identity column. For example,
     if you need to force the current identity value in the jobs table to a
     value of 100, you can use the following:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     DBCC CHECKIDENT (jobs, RESEED, 100)&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;About SQL Command line executables&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: .65in;&quot; width=&quot;62&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Utilities&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp&lt;br /&gt;
  console&lt;br /&gt;
  isql&lt;br /&gt;
  sqlagent&lt;br /&gt;
  sqldiag&lt;br /&gt;
  sqlmaint&lt;br /&gt;
  sqlservr&lt;br /&gt;
  vswitch&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dtsrun&lt;br /&gt;
  dtswiz&lt;br /&gt;
  isqlw&lt;br /&gt;
  itwiz&lt;br /&gt;
  odbccmpt&lt;br /&gt;
  osql&lt;br /&gt;
  rebuildm&lt;br /&gt;
  sqlftwiz&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;distrib&lt;br /&gt;
  logread&lt;br /&gt;
  replmerg&lt;br /&gt;
  snapshot&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;scm&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;regxmlss&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;146&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DTC?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Microsoft Distributed
     Transaction Coordinator (MS DTC) is a transaction manager that allows
     client applications to include several different sources of data in one
     transaction. MS DTC coordinates committing the distributed transaction
     across all the servers enlisted in the transaction. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DTS? Any drawbacks in using DTS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server™ 2000 Data
     Transformation Services (DTS) is a set of graphical tools and programmable
     objects that lets you extract, transform, and consolidate data from
     disparate sources into single or multiple destinations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is BCP?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;bcp&lt;/b&gt; utility copies
     data between an instance of Microsoft® SQL Server™ 2000 and a data file in
     a user-specified format.&lt;br /&gt;
     C:\Documents and Settings\sthomas&amp;gt;bcp&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;usage: bcp {dbtable | query} {in | out | queryout |
     format} datafile&lt;br /&gt;
     [-m maxerrors] [-f formatfile] [-e errfile]&lt;br /&gt;
     [-F firstrow] [-L lastrow] [-b batchsize]&lt;br /&gt;
     [-n native type] [-c character type] [-w wide character type]&lt;br /&gt;
     [-N keep non-text native] [-V file format version] [-q quoted identifier]&lt;br /&gt;
     [-C code page specifier] [-t field terminator] [-r row terminator]&lt;br /&gt;
     [-i inputfile] [-o outfile] [-a packetsize]&lt;br /&gt;
     [-S server name] [-U username] [-P password]&lt;br /&gt;
     [-T trusted connection] [-v version] [-R regional enable]&lt;br /&gt;
     [-k keep null values] [-E keep identity values]&lt;br /&gt;
     [-h &quot;load hints&quot;]&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I create a plain-text flat file from SQL Server as input
     to another application?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;One of the purposes of
     Extensible Markup Language (XML) is to solve challenges like this, but
     until all applications become XML-enabled, consider using our faithful
     standby, the bulk copy program (bcp) utility. This utility can do more
     than just dump a table; bcp also can take its input from a view instead of
     from a table. After you specify a view as the input source, you can limit
     the output to a subset of columns or to a subset of rows by selecting
     appropriate filtering (WHERE and HAVING) clauses.&lt;br /&gt;
     More important, by using a view, you can export data from multiple joined
     tables. The only thing you cannot do is specify the sequence in which the
     rows are written to the flat file, because a view does not let you include
     an ORDER BY clause in it unless you also use the TOP keyword.&lt;br /&gt;
     If you want to generate the data in a particular sequence or if you cannot
     predict the content of the data you want to export, be aware that in
     addition to a view, bcp also supports using an actual query. The only
     &quot;gotcha&quot; about using a query instead of a table or view is that
     you must specify &lt;b&gt;queryout&lt;/b&gt; in place of &lt;b&gt;out&lt;/b&gt; in the bcp command
     line.&lt;br /&gt;
     For example, you can use bcp to generate from the &lt;b&gt;pubs&lt;/b&gt; database a
     list of authors who reside in California by writing the following code:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;bcp &quot;SELECT * FROM pubs..authors WHERE state =
     &#39;CA&#39;&quot; queryout c:\CAauthors.txt -c -T -S&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different ways of moving data/databases between
     servers and databases in SQL Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are lots of options
     available, you have to choose your option depending upon your
     requirements. Some of the options you have are: BACKUP/RESTORE, detaching
     and attaching databases, replication, DTS, BCP, logshipping,
     INSERT...SELECT, SELECT...INTO, creating INSERT scripts to generate data. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will I export database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Through DTS - Import/Export
     wizard&lt;br /&gt;
     Backup - through Complete/Differential/Transaction Log &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to export database at a particular time, every week?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Backup - Schedule&lt;br /&gt;
     DTS - Schedule&lt;br /&gt;
     Jobs - create a new job &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you load large data to the SQL server database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you transfer data from text file to database (other than
     DTS)?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is OSQL and ISQL utility?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;osql &lt;/b&gt;utility allows
     you to enter Transact-SQL statements, system procedures, and script files.
     This utility uses &lt;u&gt;ODBC&lt;/u&gt; to communicate with the server. &lt;br /&gt;
     The &lt;b&gt;isql&lt;/b&gt; utility allows you to enter Transact-SQL statements,
     system procedures, and script files; and uses &lt;u&gt;DB-Library&lt;/u&gt; to
     communicate with Microsoft® SQL Server™ 2000.&lt;br /&gt;
     All DB-Library applications, such as isql, work as SQL Server 6.5–level
     clients when connected to SQL Server 2000. They do not support some SQL
     Server 2000 features.&lt;br /&gt;
     The osql utility is based on ODBC and does support all SQL Server 2000
     features. Use osql to run scripts that isql cannot run. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What Tool you have used for checking Query Optimization? What is
     the use of profiler in sql server?&amp;nbsp; What is the first thing u look at
     in a SQL Profiler?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Profiler is a graphical tool
     that allows system administrators to monitor events in an instance of
     Microsoft® SQL Server™. You can capture and save data about each event to
     a file or SQL Server table to analyze later. For example, you can monitor
     a production environment to see which stored procedures is hampering
     performance by executing too slowly. &lt;br /&gt;
     Use SQL Profiler to: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Monitor the performance of an instance of SQL
      Server. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Debug Transact-SQL statements and stored
      procedures. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identify slow-executing queries. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Test SQL statements and stored procedures in the
      development phase of a project by single-stepping through statements to
      confirm that the code works as expected. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Troubleshoot problems in SQL Server by capturing
      events on a production system and replaying them on a test system. This
      is useful for testing or debugging purposes and allows users to continue
      using the production system without interference. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Audit and review activity that
occurred on an instance of SQL Server. This allows a security administrator to
review any of the auditing events, including the success and failure of a login
attempt and the success and failure of permissions in accessing statements and
objects.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Permissions&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;157&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If a user does not have permission on a table, but he has
     permission to a view created on it, will he be able to view the data in table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After removing a table from database, what other related objects
     have to be dropped explicitly?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;(view, SP) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Different Authentication modes in Sql server? If a user is logged
     under windows authentication mode, how to find his userid?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are Three Different
     authentication modes in sqlserver. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;14&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SqlServer Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mixed Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;“system_user” system function
in sqlserver to fetch the logged on user name. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;160&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Give the connection strings from front-end for both type
     logins(windows,sqlserver)?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;This are specifically for
     sqlserver not for any other RDBMS&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Data Source=MySQLServer;Initial
     Catalog=NORTHWIND;Integrated Security=SSPI (windows)&lt;br /&gt;
     Data Source=MySQLServer;Initial Catalog=NORTHWIND;Uid=” ”;Pwd=” ”(sqlserver)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are three SQL keywords used to change or set someone’s
     permissions?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Grant, Deny and Revoke&lt;b&gt;&lt;br /&gt;
     &lt;br /&gt;
     Administration&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Different types of Backups?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
     &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;circle&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;full database&lt;/u&gt; backup is a full copy of
      the database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;transaction log&lt;/u&gt; backup copies only the
      transaction log. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;differential backup&lt;/u&gt; copies only the
      database pages modified after the last full database backup. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A file or filegroup restore allows the recovery
      of just the portion of a database that was on the failed disk. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;ol start=&quot;163&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are ‘jobs’ in SQL Server? How do we create one? What is
     tasks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Using SQL Server Agent jobs, you
     can automate administrative tasks and run them on a recurring basis. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is database replication? What are the different types of
     replication you can set up in SQL Server? How are they used? What is
     snapshot replication how is it different from Transactional replication?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Replication is the process of copying/moving data between databases on the
     same or different servers. SQL Server supports the following types of
     replication scenarios: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Snapshot replication - It distributes data
      exactly as it appears at a specific moment in time and doesn’t monitor
      for updates. It can be used when data changes are infrequent. It is often
      used for browsing data such as price lists, online catalog, or data for
      decision support where the current data is not required and data is used
      as read only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transactional replication (with immediate
      updating subscribers, with queued updating subscribers) - With this an
      initial snapshot of data is applied, and whenever data modifications are
      made at the publisher, the individual transactions are captured and
      propagated to the subscribers. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Merge replication - It is the process of
      distributing the data between publisher and subscriber, it allows the
      publisher and subscriber to update the data while connected or
      disconnected, and then merging the updates between the sites when they
      are connected. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can u look at what are the process running on SQL server? How
     can you kill a process in SQL server?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Expand a server group, and then expand a server.
      &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Expand &lt;b&gt;Management&lt;/b&gt;, and then expand &lt;b&gt;Current
      Activity&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Click &lt;b&gt;Process Info&lt;/b&gt;. The current server
      activity is displayed in the details pane. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In the details pane,
right-click a Process ID, and then click &lt;b&gt;Kill Process&lt;/b&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;166&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is RAID and what are different types of RAID configurations? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;RAID stands for Redundant Array
     of Inexpensive Disks, used to provide fault tolerance to database servers.
     There are six RAID levels 0 through 5 offering different levels of
     performance, fault tolerance. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Some of the tools/ways that help you troubleshooting performance problems
     are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL
     Server Profiler, Windows NT /2000 Performance monitor, Graphical execution
     plan in Query Analyzer. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to determine the service pack currently installed on SQL
     Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The global variable &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@Version&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; stores
     the build number of the sqlservr.exe, which is used to determine the
     service pack installed.&lt;br /&gt;
     eg: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
     Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on
     Windows NT 5.0 (Build 2195: Service Pack 3) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the purpose of using COLLATE in a query?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The term, collation, refers to a &lt;u&gt;set of rules that determine how data
     is sorted and compared&lt;/u&gt;. In Microsoft® SQL Server 2000, it is not
     required to separately specify code page and sort order for character
     data, and the collation used for Unicode data. Instead, specify the
     collation name and sorting rules to use. Character data is sorted using
     rules that define the correct character sequence, with options for
     specifying case-sensitivity, accent marks, kana character types, and
     character width. Microsoft SQL Server 2000 collations include these
     groupings: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows collations - Windows collations define
      rules for storing character data based on the rules defined for an
      associated Windows locale. The base Windows collation rules specify which
      alphabet or language is used when dictionary sorting is applied, as well
      as the code page used to store non-Unicode character data. For Windows
      collations, the &lt;b&gt;nchar&lt;/b&gt;, &lt;b&gt;nvarchar&lt;/b&gt;, and &lt;b&gt;ntext&lt;/b&gt; data
      types have the same sorting behavior as &lt;b&gt;char&lt;/b&gt;,&lt;b&gt; varchar&lt;/b&gt;, and &lt;b&gt;text&lt;/b&gt;
      data types &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL collations - SQL collations are provided &lt;u&gt;for
      compatibility &lt;/u&gt;with sort orders in earlier versions of Microsoft SQL
      Server. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sort Order&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Binary is the fastest sorting order, and is case-sensitive. If &lt;b&gt;Binary&lt;/b&gt; is
selected, the &lt;b&gt;Case-sensitive&lt;/b&gt;, &lt;b&gt;Accent-sensitive&lt;/b&gt;, &lt;b&gt;Kana-sensitive&lt;/b&gt;,
and &lt;b&gt;Width-sensitive&lt;/b&gt; options are not available. &lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 90.0%;&quot; width=&quot;90%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sort order&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Binary&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sorts and compares data in
  Microsoft® SQL Server™ tables based on the bit patterns defined for each
  character. Binary sort order is case-sensitive, that is lowercase precedes
  uppercase, and accent-sensitive. This is the fastest sorting order. &lt;br /&gt;
  If this option is not selected, SQL Server follows sorting and comparison
  rules as defined in dictionaries for the associated language or alphabet.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Case-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between uppercase and lowercase letters. &lt;br /&gt;
  If not selected, SQL Server considers the uppercase and lowercase versions of
  letters to be equal. SQL Server does not define whether lowercase letters
  sort lower or higher in relation to uppercase letters when Case-sensitive is
  not selected.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Accent-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between accented and unaccented characters. For example, &#39;a&#39; is
  not equal to &#39;á&#39;. &lt;br /&gt;
  If not selected, SQL Server considers the accented and unaccented versions of
  letters to be equal.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Kana-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between the two types of Japanese kana characters: Hiragana and
  Katakana. &lt;br /&gt;
  If not selected, SQL Server considers Hiragana and Katakana characters to be
  equal.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Width-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between a single-byte character (half-width) and the same
  character when represented as a double-byte character (full-width). &lt;br /&gt;
  If not selected, SQL Server considers the single-byte and double-byte
  representation of the same character to be equal. &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;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows collation options: &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;169&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Latin1_General &lt;/b&gt;for the U.S. English
      character set (code page 1252). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Modern_Spanish&lt;/b&gt; for all variations of
      Spanish, which also use the same character set as U.S. English (code page
      1252). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Arabic&lt;/b&gt; for all variations of Arabic,
      which use the Arabic character set (code page 1256). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Japanese_Unicode&lt;/b&gt; for the Unicode
      version of Japanese (code page 932), which has a different sort order
      from &lt;b&gt;Japanese&lt;/b&gt;, but the same code page (932). &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the STUFF Function and how does it differ from the REPLACE
     function?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;STUFF - &lt;u&gt;Deletes a specified
     length of characters and inserts another set of characters&lt;/u&gt; at a
     specified starting point. &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT STUFF(&#39;abcdef&#39;, 2, 3, &#39;ijklmn&#39;)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Here is the result set:&lt;br /&gt;
     &lt;/span&gt;&lt;code&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;--------- &lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;code&gt;aijklmnef&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;REPLACE - Replaces &lt;u&gt;all
occurrences of the second given string expression in the first string expression
with a third expression&lt;/u&gt;.&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT REPLACE(&#39;abcdefghicde&#39;,&#39;cde&#39;,&#39;xxx&#39;)&lt;br /&gt;
GO &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Here is the result set: &lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;------------&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;abxxxfghixxx &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;171&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What does it mean to have quoted_identifier on? What are the
     implications of having it off?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When SET QUOTED_IDENTIFIER is
     OFF (default), literal strings in expressions can be delimited by single
     or double quotation marks.&lt;br /&gt;
     When SET QUOTED_IDENTIFIER is ON, all strings delimited by double
     quotation marks are interpreted as object identifiers. Therefore, quoted
     identifiers do not have to follow the Transact-SQL rules for identifiers. &lt;br /&gt;
     SET QUOTED_IDENTIFIER must be ON when creating or manipulating indexes on
     computed columns or indexed views. If SET QUOTED_IDENTIFIER is OFF,
     CREATE, UPDATE, INSERT, and DELETE statements on tables with indexes on
     computed columns or indexed views will fail. &lt;br /&gt;
     The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server
     automatically set QUOTED_IDENTIFIER to ON when connecting.&lt;br /&gt;
     When a stored procedure is created, the SET QUOTED_IDENTIFIER and SET
     ANSI_NULLS settings are captured and used for subsequent invocations of
     that stored procedure. When executed inside a stored procedure, the
     setting of SET QUOTED_IDENTIFIER is not changed.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET QUOTED_IDENTIFIER OFF&lt;br /&gt;
     GO&lt;br /&gt;
     -- Attempt to create a table with a reserved keyword as a name&lt;br /&gt;
     -- should fail.&lt;br /&gt;
     CREATE TABLE &quot;select&quot; (&quot;identity&quot; int IDENTITY,
     &quot;order&quot; int)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     SET QUOTED_IDENTIFIER ON&lt;br /&gt;
     GO&lt;br /&gt;
     -- Will succeed.&lt;br /&gt;
     CREATE TABLE &quot;select&quot; (&quot;identity&quot; int IDENTITY,
     &quot;order&quot; int)&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the purpose of UPDATE STATISTICS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Updates information about the
     distribution of key values for one or more statistics groups (collections)
     in the specified table or indexed view. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Fundamentals of Data warehousing &amp;amp; olap?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What do u mean by OLAP server? What is the difference between OLAP
     and OLTP?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a tuple?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;b&gt;tuple&lt;/b&gt; is an instance of
     data within a relational database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Services and user Accounts maintenance&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_configure commands?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Displays or changes global
     configuration settings for the current server. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the basic functions for master, msdb, tempdb databases?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Microsoft® SQL Server 2000 systems have four system databases: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;master&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - The &lt;b&gt;master&lt;/b&gt; database records all of the &lt;u&gt;system level
      information&lt;/u&gt; for a SQL Server system. It &lt;u&gt;records all login accounts&lt;/u&gt;
      and all system configuration settings. &lt;b&gt;master&lt;/b&gt; is the database that
      &lt;u&gt;records the existence of all other databases, including the location&lt;/u&gt;
      of the database files. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tempdb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - &lt;b&gt;tempdb&lt;/b&gt; &lt;u&gt;holds all temporary tables and temporary stored
      procedures&lt;/u&gt;. It also fills any other &lt;u&gt;temporary storage needs such
      as work tables&lt;/u&gt; generated by SQL Server. &lt;b&gt;tempdb&lt;/b&gt; is re-created
      every time SQL Server is started so the system starts with a clean copy
      of the database. &lt;br /&gt;
      By default, &lt;b&gt;tempdb&lt;/b&gt; autogrows as needed while SQL Server is
      running. If the size defined for &lt;b&gt;tempdb&lt;/b&gt; is small, part of your
      system processing load may be taken up with autogrowing &lt;b&gt;tempdb&lt;/b&gt; to
      the size needed to support your workload each time to restart SQL Server.
      You can avoid this overhead by using ALTER DATABASE to increase the size
      of &lt;b&gt;tempdb&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;model&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - The &lt;b&gt;model&lt;/b&gt; database is used as the &lt;u&gt;template for all databases
      created on a system&lt;/u&gt;. When a CREATE DATABASE statement is issued, the
      first part of the database is created by copying in the contents of the &lt;b&gt;model&lt;/b&gt;
      database, then the remainder of the new database is filled with empty
      pages. Because &lt;b&gt;tempdb&lt;/b&gt; is created every time SQL Server is started,
      the &lt;b&gt;&lt;u&gt;model&lt;/u&gt;&lt;/b&gt;&lt;u&gt; database must always exist&lt;/u&gt; on a SQL Server
      system. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;msdb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
      The &lt;b&gt;msdb&lt;/b&gt; database is used by SQL Server Agent for &lt;u&gt;scheduling
      alerts and jobs, and recording operators&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are sequence diagrams? What you will get out of this sequence
     diagrams?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sequence diagrams document the
     interactions between classes to achieve a result, such as a use case.
     Because UML is designed for object-oriented programming, these communications
     between classes are known as messages. The sequence diagram lists objects
     horizontally, and time vertically, and models these messages over time. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the new features of SQL 2000 than SQL 7? What are the new
     datatypes in sql?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;XML Support - The relational database engine can
      return data as Extensible Markup Language (XML) documents. Additionally,
      XML can also be used to insert, update, and delete values in the
      database. (for xml raw - to retrieve output as xml type) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;User-Defined Functions - The programmability of
      Transact-SQL can be extended by creating your own Transact-SQL functions.
      A user-defined function can return either a scalar value or a table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Indexed Views - Indexed views can significantly
      improve the performance of an application where queries frequently
      perform certain joins or aggregations. An indexed view allows indexes to
      be created on views, where the result set of the view is stored and
      indexed in the database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;New Data Types&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - SQL Server 2000 introduces three new data types. &lt;b&gt;bigint&lt;/b&gt;
      is an 8-byte integer type. &lt;b&gt;sql_variant&lt;/b&gt; is a type that allows the
      storage of data values of different data types. &lt;b&gt;table&lt;/b&gt; is a type
      that allows applications to store results temporarily for later use. It
      is supported for variables, and as the return type for user-defined
      functions. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;INSTEAD OF and AFTER Triggers&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - INSTEAD OF triggers are executed instead of
      the triggering action (for example, INSERT, UPDATE, DELETE). They can
      also be defined on views, in which case they greatly extend the types of
      updates a view can support. AFTER triggers fire after the triggering
      action. SQL Server 2000 introduces the ability to specify which AFTER
      triggers fire first and last. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Multiple Instances&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; of SQL Server - SQL Server 2000 supports
      running multiple instances of the relational database engine on the same
      computer. Each computer can run one instance of the relational database
      engine from SQL Server version 6.5 or 7.0, along with one or more
      instances of the database engine from SQL Server 2000. Each instance has
      its own set of system and user databases. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Index Enhancements - You can now create indexes
      on computed columns. You can specify whether indexes are built in
      ascending or descending order, and if the database engine should use
      parallel scanning and sorting during index creation. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do we open SQL Server in single user mode?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;We can accomplish this in any of
     the three ways given below :- &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;21&quot; type=&quot;a&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Command Prompt :-&lt;br /&gt;
      &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sqlservr -m&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Startup Options :-&lt;br /&gt;
      Go to SQL Server Properties by right-clicking on the Server name in the
      Enterprise manager. &lt;br /&gt;
      Under the &#39;General&#39; tab, click on &#39;Startup Parameters&#39;. &lt;br /&gt;
      Enter a value of -m in the Parameter. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Registry :-&lt;br /&gt;
      Go to
      HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\MSSQLServer\Parameters.
      &lt;br /&gt;
      Add new string value. &lt;br /&gt;
      Specify the &#39;Name&#39; as SQLArg(n) &amp;amp; &#39;Data&#39; as -m. &lt;br /&gt;
      Where n is the argument number in the list of arguments. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;182&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Log Shipping?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In Microsoft® SQL Server™ 2000
     Enterprise Edition, you can use log shipping to feed transaction logs from
     one database to another on a constant basis. Continually backing up the
     transaction logs from a source database and then copying and restoring the
     logs to a destination database keeps the destination database synchronized
     with the source database. This allows you to have a backup server and also
     provides a way to offload query processing from the main computer (the
     source server) to read-only destination servers. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;XML&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;183&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I convert data in a Microsoft Access table into XML
     format?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The following applications can
     help you convert Access data into XML format: Access 2002, ADO 2.5, and
     SQLXML. Access 2002 (part of Microsoft Office&amp;nbsp;XP) enables you to
     query or save a table in XML format. You might be able to automate this
     process. ADO 2.5 and later enables you to open the data into a recordset,
     then persist the recordset in XML format, as the following code shows:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     rs.Save &quot;c:\rs.xml&quot;, adPersistXML&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use linked servers to add
     the Access database to your SQL Server 2000 database so you can run
     queries from within SQL Server to retrieve data. Then, through HTTP, you
     can use the SQLXML technology to extract the Access data in the XML format
     you want.&lt;b&gt;&lt;br /&gt;
     &lt;br /&gt;
     NEW&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;@@IDENTITY ?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ans: Returns the last-inserted
     identity value. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/639683465737333145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/639683465737333145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/639683465737333145'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq.html' title='SQL Server FAQ'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-7415420814326013414</id><published>2012-08-04T13:07:00.000+05:30</published><updated>2012-08-04T13:16:42.332+05:30</updated><title type='text'>Top 15 IT Certifications for 2012</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Certification of any technology makes out individuals with technical 
expertise and proves their ability to design and build innovative 
solutions for that particular technology. Below is the List of Top 15 IT certification of Year 2012.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;

&lt;/h4&gt;
&lt;ol start=&quot;1&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;PMP - Project Management Professional.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CISSP - Certified Information Systems Security
     Professional&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CCDA - Cisco Certified Design Associate -
     $101,915&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;ITIL v3 Foundation &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;MCSE - Microsoft Certified Systems Engineer &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;VCP - VMware Certified Professional&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CCNP - Cisco Certified Network Professional&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CompTIA Server&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;MCITP - Microsoft Certified IT Professional &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CCNA - Cisco Certified Network Associate &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;MCSA - Microsoft Certified Systems Administrator &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CompTIA Security&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;MCP - Microsoft Certified Professional &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CCENT - Cisco Certified Entry Networking Technician
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;&quot;&gt;CompTIA Network.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
For more information regarding each certification with it Pay, visit following link&lt;br /&gt;
&lt;a href=&quot;http://www.globalknowledge.com/articles/generic.asp?pageid=3158&amp;amp;country=United+States&quot; target=&quot;_blank&quot; title=&quot;Top 15&quot;&gt;http://www.globalknowledge.com/articles/generic.asp?pageid=3158&amp;amp;country=United+States&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may also fallow&lt;br /&gt;
&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/sql-server-2012-new-features-for-net.html&quot;&gt;Sql Server 2012 New Features for .NET Developer&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-1.html&quot;&gt;State Management in ASP.NET part-1 (Cookies)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq.html&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14.0pt; mso-bidi-font-size: 10.0pt;&quot;&gt;SQL Server FAQ&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/top-15-it-certifications-for-2012.html&quot;&gt;Top 15 IT Certifications for 2012&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/7415420814326013414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/top-15-it-certifications-for-2012.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7415420814326013414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7415420814326013414'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/top-15-it-certifications-for-2012.html' title='Top 15 IT Certifications for 2012'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-8955626710751126498</id><published>2012-08-04T13:01:00.001+05:30</published><updated>2012-08-05T19:14:11.736+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><category scheme="http://www.blogger.com/atom/ns#" term="Text to word"/><title type='text'>State Management in ASP.NET part-1 (Cookies)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi, &lt;br /&gt;
&lt;br /&gt;
I am Back with State Management Series.&lt;br /&gt;
In this post we are going to Talk about Cookies. After Reading this, you must be able to do following things:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Create Cookie&lt;/li&gt;
&lt;li&gt;Access Cookie&lt;/li&gt;
&lt;li&gt;Can answer Some Basic Q &amp;amp; A about Cookie&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;What is Need of Cookie?&lt;/b&gt;&lt;br /&gt;
Cookies are Required to Store Temporary data in Users system which may be Required during Session or after Session.&lt;br /&gt;
&lt;b&gt;How Many Type of Cookie are there?&lt;/b&gt;&lt;br /&gt;
Cookies
 are generally of Two Type. Session wide or Persistent. Sessional 
cookies Expire as soon as User Closed Session means Browser. Persistent 
cookies expire after Defined Time. This can be Defined at the Time of 
Creation.&lt;br /&gt;
&lt;b&gt;Who Make Cookies?&lt;/b&gt;&lt;br /&gt;
Cookie is always made
 by Application (Server) in Users/ Clients Browser and stored in Hard 
Disk of User. These are used to store Users Customized Appearance, other
 Values , Login Time etc for future Retrieval so that website can server
 him better.&lt;br /&gt;
&lt;b&gt;Limitations of Cookie?&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Cookies are open Invitations to Hackers.&lt;/li&gt;
&lt;li&gt;Cookies can only store Little and Only String Type Data.&lt;/li&gt;
&lt;/ul&gt;
Now Lets Learn with Coding. First We will Create a Cookie named myCookie and Solve Earlier Problem with the Help of Cookie.&lt;br /&gt;
&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Johnbhatt_5214_Untitled.jpg&quot; /&gt;
&lt;br /&gt;
Now Code is Like Below:&lt;br /&gt;
&lt;pre&gt; protected void Page_Load(object sender, EventArgs e)
    {

    }
    int x;    // Made a Variable with Datatype Int for Future Use
    HttpCookie myCookie;   // Defined a Cookie named myCookie.
    protected void Button1_Click(object sender, EventArgs e)
    { 
        x = Convert.ToInt32(TextBox1.Text);  // Converted textbox Value which we earlier Did.
        myCookie = new HttpCookie(&quot;txtValue&quot;);  // Assigned Variable myCookie.
        myCookie.Value = Convert.ToString(x);   // Value assigned to myCookie.
        Response.Cookies.Add(myCookie); //This Simple Made a Cookie that will Expire in Session End.
        myCookie.Expires = DateTime.Now.AddMinutes(15);  // We made is Persistent and stored it for Next 15 minutes.
      
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
       
        HttpCookie storedCook = Request.Cookies[&quot;txtValue&quot;];  // Requested from Server for Cookie
        if (storedCook != null)  
            x = Convert.ToInt32(storedCook.Value);  // Converted to Integer again.
        TextBox1.Text = Convert.ToString(x * x);    // Now Printed Value in Textbox.
    }&lt;/pre&gt;
Now Check.... &lt;br /&gt;
Cool na, I&#39;ll be waiting for Feedback.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/8955626710751126498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8955626710751126498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/8955626710751126498'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-1.html' title='State Management in ASP.NET part-1 (Cookies)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-4202323086986582185</id><published>2012-08-04T12:58:00.004+05:30</published><updated>2012-08-04T13:12:42.336+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><title type='text'>Sql Server 2012 New Features for .NET Developer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 12.0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Sql Server 2012 adds lots of new
features in the form of IDE, coding and programming Enhancements. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;The most and bigger change to SSMS (management
studio) is that it&#39;s built on Visual Studio 2010. So, now Sql server 2012 now
supports multi-monitor support.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Another productivity benefit of
SQL server 2012 is supports code snippets same like Visual studio within
management studio. You can accessed via hotkeys (Ctrl+K, X and Ctrl+K).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Now SQL Server 2012 supports most
awaited functionality is &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;THROW&lt;span style=&quot;mso-bidi-font-weight: bold;&quot;&gt; statement&lt;/span&gt;&lt;/b&gt; and in-built &lt;b&gt;&lt;i&gt;Pagination&lt;/i&gt;&lt;/b&gt;
(using OFFSET and FETCH&lt;b&gt; with order by clause&lt;/b&gt;).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-style: italic; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Choose&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-style: italic; mso-bidi-font-weight: bold; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; () function: retu&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;rns the item at the specified index from a list of
values (like array).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;Developer who are familiar with
.Net framework now can also use Sql server new function like TRY_CONVERT
(),&amp;nbsp; TRY_PARSE () and Format (for format &lt;b&gt;date&lt;/b&gt;) functions.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-left: 35.7pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt; text-indent: -17.85pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;·&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;SQL &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: Symbol; mso-fareast-language: EN-IN;&quot;&gt;servers express&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt; &lt;b&gt;Local DB:&lt;/b&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;lightweight
 version of SQL Server that has many programmability features of a SQL 
Server database like stored procedures, user-defined functions and 
aggregates, .NET Framework integration,spatial types and others that are
 not available in SQL Server Compact. It does not support &lt;b&gt;FILESTREAM &lt;/b&gt;and only allows local
queues for Service Broker.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
In nutshell, &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;SQL &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; line-height: 115%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;server 2k12 does a great job of by introducing CLR functionality
directly into T-SQL, which makes T-SQL programming very easy.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/4202323086986582185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-2012-new-features-for-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/4202323086986582185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/4202323086986582185'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-2012-new-features-for-net.html' title='Sql Server 2012 New Features for .NET Developer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-230559220702912560</id><published>2012-08-04T12:58:00.001+05:30</published><updated>2012-08-04T13:12:42.228+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><title type='text'></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 align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 14.0pt; mso-bidi-font-size: 10.0pt;&quot;&gt;SQL Server FAQ&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transact-SQL Optimization
Tips&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;u&gt;views and stored procedures&lt;/u&gt; instead of heavy-duty
     queries.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can reduce network traffic, because your client will send to server
     only stored procedure or view name (perhaps with some parameters) instead
     of large heavy-duty queries text. This can be used to facilitate
     permission management also, because you can restrict user access to table
     columns they should not see. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to use &lt;u&gt;constraints&lt;/u&gt; instead of triggers, whenever
     possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Constraints are much more efficient than triggers and can boost
     performance. So, you should use constraints instead of triggers, whenever
     possible. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;u&gt;table variables &lt;/u&gt;instead of temporary tables.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Table variables require less locking and logging resources than temporary
     tables, so table variables should be used whenever possible. The table
     variables are available in SQL Server 2000 only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to use &lt;u&gt;UNION ALL statement&lt;/u&gt; instead of UNION, whenever
     possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The UNION ALL statement is much faster than UNION, because UNION ALL statement
     does not look for duplicate rows, and UNION statement does look for
     duplicate rows, whether or not they exist. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid using the DISTINCT&lt;/u&gt; clause, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Because using the DISTINCT clause will result in some performance
     degradation, you should use this clause only when it is necessary. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid using SQL Server cursors&lt;/u&gt;, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     SQL Server cursors can result in some performance degradation in
     comparison with select statements. Try to use correlated sub-query or
     derived tables, if you need to perform row-by-row operations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to &lt;u&gt;avoid the HAVING clause&lt;/u&gt;, whenever possible.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The HAVING clause is used to restrict the result set returned by the GROUP
     BY clause. When you use GROUP BY with the HAVING clause, the GROUP BY
     clause divides the rows into sets of grouped rows and aggregates their
     values, and then the HAVING clause eliminates undesired aggregated groups.
     In many cases, you can write your select statement so, that it will
     contain only WHERE and GROUP BY clauses without HAVING clause. This can
     improve the performance of your query. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If you need to return the total table&#39;s row count, you can use
     alternative way instead of SELECT COUNT(*) statement.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Because &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; statement make a full table scan to return the
     total table&#39;s row count, it can take very many time for the large table.
     There is another way to determine the total row count in a table. You can
     use sysindexes system table, in this case. There is ROWS column in the
     sysindexes table. This column contains the total row count for each table
     in your database. So, you can use the following select statement instead
     of &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*): SELECT rows FROM
     sysindexes WHERE id = OBJECT_ID(&#39;table_name&#39;) AND indid &amp;lt; 2 &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;So, you can improve the speed of such queries in
     several times. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Include &lt;u&gt;SET NOCOUNT ON statement into your stored procedures &lt;/u&gt;to
     stop the message indicating the number of rows affected by a T-SQL
     statement.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can reduce network traffic, because your client will not receive the
     message indicating the number of rows affected by a T-SQL statement. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to restrict the queries result set by &lt;u&gt;using the WHERE&lt;/u&gt;
     clause.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can results in good performance benefits, because SQL Server will
     return to client only particular rows, not all rows from the table(s).
     This can reduce network traffic and boost the overall performance of the
     query. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use the select statements with &lt;u&gt;TOP keyword or the SET ROWCOUNT&lt;/u&gt;
     statement, if you need to return only the first n rows.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can improve performance of your queries, because the smaller result
     set will be returned. This can also reduce the traffic between the server
     and the clients. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l3 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try to restrict the queries result set by r&lt;u&gt;eturning only the
     particular columns&lt;/u&gt; from the table, not all table&#39;s columns.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     This can results in good performance benefits, because SQL Server will
     return to client only particular columns, not all table&#39;s columns. This
     can reduce network traffic and boost the overall performance of the query.
     &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1.Indexes&lt;br /&gt;
2.avoid more number of triggers on the table&lt;br /&gt;
3.unnecessary complicated joins&lt;br /&gt;
4.correct use of Group by clause with the select list&lt;br /&gt;
5.in worst cases Denormalization&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Index Optimization tips&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;


&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Every
     index increases the time in takes to perform INSERTS, UPDATES and DELETES,
     so the number of indexes &lt;u&gt;should not be very much&lt;/u&gt;. Try to use
     maximum 4-5 indexes on one table, not more. If you have read-only table,
     then the number of indexes may be increased. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Keep
     your indexes as narrow as possible. This reduces the size of the index and
     reduces the number of reads required to read the index. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Try
     to create indexes on columns that &lt;u&gt;have integer values&lt;/u&gt; rather than
     character values. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     you create a composite (multi-column) index, the order of the columns in
     the key are very important. Try to order the columns in the key as to enhance
     selectivity, with the most selective columns to the leftmost of the key. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     you want to join several tables, try to create surrogate integer keys for
     this purpose and create indexes on their columns. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create
     surrogate integer primary key (identity for example) if your table will
     not have many insert operations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Clustered
     indexes are more preferable than nonclustered, if you need to select by a
     range of values or you need to sort results set with GROUP BY or ORDER BY.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If
     your application will be performing the same query over and over on the
     same table, consider creating a covering index on the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You
     can use the SQL Server Profiler Create Trace Wizard with &quot;Identify
     Scans of Large Tables&quot; trace to determine which tables in your
     database may need indexes. This trace will show which tables are being
     scanned by queries instead of using an index. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l2 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You
     can use &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_MSforeachtable&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; undocumented stored procedure to rebuild all
     indexes in your database. Try to schedule it to execute during CPU idle
     time and slow production periods.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_MSforeachtable @command1=&quot;print &#39;?&#39; DBCC
     DBREINDEX (&#39;?&#39;)&quot;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;T-SQL Queries&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2
     tables &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin-left: .5in; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 20.0%;&quot; width=&quot;20%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Employee&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Phone&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;empid&lt;br /&gt;
  empname&lt;br /&gt;
  salary&lt;br /&gt;
  mgrid&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;empid&lt;br /&gt;
  phnumber&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;2&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Select
     all employees who doesn&#39;t have phone?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT empname&lt;br /&gt;
     FROM Employee&lt;br /&gt;
     WHERE (empid NOT IN&lt;br /&gt;
     (SELECT DISTINCT empid&lt;br /&gt;
     FROM phone))&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select
     the employee names who is having more than one phone numbers.&lt;br /&gt;
     SELECT empname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM phone&lt;br /&gt;
     GROUP BY empid&lt;br /&gt;
     HAVING COUNT(empid) &amp;gt; 1)) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Select
     the details of 3 max salaried employees from employee table.&lt;br /&gt;
     SELECT TOP 3 empid, salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     ORDER BY salary DESC &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Display
     all managers from the table. (manager id is same as emp id)&lt;br /&gt;
     SELECT empname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT DISTINCT mgrid&lt;br /&gt;
     FROM employee))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write
     a Select statement to list the Employee Name, Manager Name under a
     particular manager?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT e1.empname AS EmpName, e2.empname AS ManagerName&lt;br /&gt;
     FROM Employee e1 INNER JOIN&lt;br /&gt;
     Employee e2 ON e1.mgrid = e2.empid&lt;br /&gt;
     ORDER BY e2.mgrid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2
     tables emp and phone.&lt;br /&gt;
     emp fields are - empid, name&lt;br /&gt;
     Ph fields are - empid, ph (office, mobile, home). Select all employees who
     doesn&#39;t have any ph nos.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM employee LEFT OUTER JOIN&lt;br /&gt;
     phone ON employee.empid = phone.empid&lt;br /&gt;
     WHERE (phone.office IS NULL OR phone.office = &#39; &#39;)&lt;br /&gt;
     AND (phone.mobile IS NULL OR phone.mobile = &#39; &#39;)&lt;br /&gt;
     AND (phone.home IS NULL OR phone.home = &#39; &#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find
     employee who is living in more than one city. &lt;br /&gt;
     Two Tables: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 30.0%;&quot; width=&quot;30%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Emp&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;City&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Empid&lt;br /&gt;
  empName&lt;br /&gt;
  Salary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 50.0%;&quot; width=&quot;50%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Empid&lt;br /&gt;
  City&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;9&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT
     empname, fname, lname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM city&lt;br /&gt;
     GROUP BY empid&lt;br /&gt;
     HAVING COUNT(empid) &amp;gt; 1))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find
     all employees who is living in the same city. (table is same as above)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT fname&lt;br /&gt;
     FROM employee&lt;br /&gt;
     WHERE (empid IN&lt;br /&gt;
     (SELECT empid&lt;br /&gt;
     FROM city a&lt;br /&gt;
     WHERE city IN&lt;br /&gt;
     (SELECT city&lt;br /&gt;
     FROM city b&lt;br /&gt;
     GROUP BY city&lt;br /&gt;
     HAVING COUNT(city) &amp;gt; 1)))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table named MovieTable with three columns - moviename, person and
     role. Write a query which gets the movie details where Mr. Amitabh and Mr.
     Vinod acted and their role is actor.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DISTINCT m1.moviename&lt;br /&gt;
     FROM MovieTable m1 INNER JOIN&lt;br /&gt;
     MovieTable m2 ON m1.moviename = m2.moviename&lt;br /&gt;
     WHERE (m1.person = &#39;amitabh&#39; AND m2.person = &#39;vinod&#39; OR&lt;br /&gt;
     m2.person = &#39;amitabh&#39; AND m1.person = &#39;vinod&#39;) AND (m1.role = &#39;actor&#39;) AND
     (m2.role = &#39;actor&#39;)&lt;br /&gt;
     ORDER BY m1.moviename&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     are two employee tables named emp1 and emp2. Both contains same structure
     (salary details). But Emp2 salary details are incorrect and emp1 salary
     details are correct. So, write a query which corrects salary details of
     the table emp2&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;update a set a.sal=b.sal from emp1 a, emp2 b where
     a.empid=b.empid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given
     a Table named “Students” which contains studentid, subjectid and marks.
     Where there are 10 subjects and 50 students. Write a Query to find out the
     Maximum marks obtained in each subject. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In
     this same tables now write a SQL Query to get the studentid also to
     combine with previous results. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Three
     tables – student , course, marks – how do go at finding name of the
     students who got max marks in the diff courses.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT student.name, course.name AS coursename, marks.sid,
     marks.mark&lt;br /&gt;
     FROM marks INNER JOIN&lt;br /&gt;
     student ON marks.sid = student.sid INNER JOIN&lt;br /&gt;
     course ON marks.cid = course.cid&lt;br /&gt;
     WHERE (marks.mark =&lt;br /&gt;
     (SELECT MAX(Mark)&lt;br /&gt;
     FROM Marks MaxMark&lt;br /&gt;
     WHERE MaxMark.cID = Marks.cID))&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table day_temp which has three columns dayid, day and temperature.
     How do I write a query to get the difference of temperature among each
     other for seven days of a week?&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT a.dayid, a.dday, a.tempe, a.tempe - b.tempe AS
     Difference&lt;br /&gt;
     FROM day_temp a INNER JOIN&lt;br /&gt;
     day_temp b ON a.dayid = b.dayid + 1&lt;br /&gt;
     OR&lt;br /&gt;
     Select a.day, a.degree-b.degree from temperature a, temperature b where
     a.id=b.id+1&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     is a table which contains the names like this. a1, a2, a3, a3, a4, a1, a1,
     a2 and their salaries. Write a query to get grand total salary, and total
     salaries of individual employees in one query.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT empid, SUM(salary) AS salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     GROUP BY empid WITH ROLLUP&lt;br /&gt;
     ORDER BY empid&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to know how many tables contains empno as a column in a
     database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT COUNT(*) AS Counter&lt;br /&gt;
     FROM syscolumns&lt;br /&gt;
     WHERE (name = &#39;empno&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find duplicate rows in a table? OR I have a table with one column
     which has many records which are not distinct. I need to find the distinct
     values from that column and number of times it’s repeated.&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     SELECT sid, mark, COUNT(*) AS Counter&lt;br /&gt;
     FROM marks&lt;br /&gt;
     GROUP BY sid, mark&lt;br /&gt;
     HAVING (COUNT(*) &amp;gt; 1)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to delete the rows which are duplicate (don’t delete both
     duplicate records).&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET ROWCOUNT 1&lt;br /&gt;
     DELETE yourtable&lt;br /&gt;
     FROM yourtable a&lt;br /&gt;
     WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND b.age1
     = a.age1) &amp;gt; 1&lt;br /&gt;
     WHILE @@rowcount &amp;gt; 0&lt;br /&gt;
     &amp;nbsp; DELETE yourtable&lt;br /&gt;
     &amp;nbsp; FROM yourtable a&lt;br /&gt;
     &amp;nbsp; WHERE (SELECT COUNT(*) FROM yourtable b WHERE b.name1 = a.name1 AND
     b.age1 = a.age1) &amp;gt; 1&lt;br /&gt;
     SET ROWCOUNT 0&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find 6th highest salary&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT TOP 1 salary&lt;br /&gt;
     FROM (SELECT DISTINCT TOP 6 salary&lt;br /&gt;
     FROM employee&lt;br /&gt;
     ORDER BY salary DESC) a&lt;br /&gt;
     ORDER BY salary&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Find top salary among two tables&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT TOP 1 sal&lt;br /&gt;
     FROM (SELECT MAX(sal) AS sal&lt;br /&gt;
     FROM sal1&lt;br /&gt;
     UNION&lt;br /&gt;
     SELECT MAX(sal) AS sal&lt;br /&gt;
     FROM sal2) a&lt;br /&gt;
     ORDER BY sal DESC&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a query to convert all the letters in a word to upper case&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT UPPER(&#39;test&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a query to round up the values of a number. For example even
     if the user enters 7.1 it should be rounded up to 8.&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CEILING (7.1)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Write a SQL Query to find first day of month?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT DATENAME(dw, DATEADD(dd, -
     DATEPART(dd, GETDATE()) + 1, GETDATE())) AS FirstDay&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 2.0in;&quot; width=&quot;192&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Datepart&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Abbreviations&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;year&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;yy, yyyy&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;quarter&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;qq, q&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;month&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;mm, m&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dayofyear&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dy, y&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;day&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dd, d&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;week&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;wk, ww&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;weekday&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dw&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;hour&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;hh&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;minute&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;mi, n&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;second&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ss, s&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 70.8pt;&quot; valign=&quot;top&quot; width=&quot;94&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;millisecond&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 71.4pt;&quot; valign=&quot;top&quot; width=&quot;95&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ms&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;26&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Table
     A contains column1 which is primary key and has 2 values (1, 2) and Table
     B contains column1 which is primary key and has 2 values (2, 3). Write a
     query which returns the values that are not common for the tables and the
     query should return one column with 2 records.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT tbla.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a &amp;lt;&amp;gt;&lt;br /&gt;
     (SELECT tblb.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a = tblb.a)&lt;br /&gt;
     UNION&lt;br /&gt;
     SELECT tblb.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tblb.a &amp;lt;&amp;gt;&lt;br /&gt;
     (SELECT tbla.a&lt;br /&gt;
     FROM tbla, tblb&lt;br /&gt;
     WHERE tbla.a = tblb.a)&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR (better approach)&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT a&lt;br /&gt;
     FROM tbla&lt;br /&gt;
     WHERE a NOT IN&lt;br /&gt;
     (SELECT a&lt;br /&gt;
     FROM tblb)&lt;br /&gt;
     UNION ALL&lt;br /&gt;
     SELECT a&lt;br /&gt;
     FROM tblb&lt;br /&gt;
     WHERE a NOT IN&lt;br /&gt;
     (SELECT a&lt;br /&gt;
     FROM tbla)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There
     are 3 tables Titles, Authors and Title-Authors (check PUBS db). Write the
     query to get the author name and the number of books written by that
     author, the result should start from the author who has written the
     maximum number of books and end with the author who has written the
     minimum number of books.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT authors.au_lname, COUNT(*) AS BooksCount&lt;br /&gt;
     FROM authors INNER JOIN&lt;br /&gt;
     titleauthor ON authors.au_id = titleauthor.au_id INNER JOIN&lt;br /&gt;
     titles ON titles.title_id = titleauthor.title_id&lt;br /&gt;
     GROUP BY authors.au_lname&lt;br /&gt;
     ORDER BY BooksCount DESC&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;UPDATE emp_master&lt;br /&gt;
     SET emp_sal = &lt;br /&gt;
     CASE&lt;br /&gt;
     WHEN emp_sal &amp;gt; 0 AND emp_sal &amp;lt;= 20000 THEN (emp_sal * 1.01) &lt;br /&gt;
     WHEN em&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;p_sal &amp;gt; 20000 THEN (emp_sal
     * 1.02) &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;List
     all products with total quantity ordered, if quantity ordered is null show
     it as 0.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT name, CASE WHEN SUM(qty) IS NULL THEN 0 WHEN
     SUM(qty) &amp;gt; 0 THEN SUM(qty) END AS tot&lt;br /&gt;
     FROM [order] RIGHT OUTER JOIN&lt;br /&gt;
     product ON [order].prodid = product.prodid&lt;br /&gt;
     GROUP BY name&lt;br /&gt;
     Result:&lt;br /&gt;
     coke 60&lt;br /&gt;
     mirinda 0&lt;br /&gt;
     pepsi 10&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ANY,
     SOME, or ALL?&lt;br /&gt;
     ALL means greater than every value--in other words, greater than the
     maximum value. For example, &amp;gt;ALL (1, 2, 3) means greater than 3.&lt;br /&gt;
     ANY means greater than at least one value, that is, greater than the
     minimum. So &amp;gt;ANY (1, 2, 3) means greater than 1. SOME is an SQL-92
     standard equivalent for ANY. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;IN
     &amp;amp; = (difference in correlated sub query)&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;INDEX&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Index? It’s purpose?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Indexes in databases are similar
     to indexes in books. In a database, an index allows the database program
     to find data in a table without scanning the entire table. An index in a
     database is a list of values in a table with the storage locations of rows
     in the table that contain each value. Indexes can be created on either a
     single column or a combination of columns in a table and are implemented
     in the form of B-trees. An index contains an entry with one or more
     columns (the search key) from each row in a table. A B-tree is sorted on
     the search key, and can be searched efficiently on any leading subset of
     the search key. For example, an index on columns &lt;b&gt;A&lt;/b&gt;, &lt;b&gt;B&lt;/b&gt;, &lt;b&gt;C&lt;/b&gt;
     can be searched efficiently on &lt;b&gt;A&lt;/b&gt;, on &lt;b&gt;A&lt;/b&gt;, &lt;b&gt;B&lt;/b&gt;, and &lt;b&gt;A&lt;/b&gt;,
     &lt;b&gt;B&lt;/b&gt;, &lt;b&gt;C&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Explain about Clustered and non clustered index? How to choose
     between a Clustered Index and a Non-Clustered Index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are clustered and
     nonclustered indexes. A clustered index is a special type of index that
     reorders the way records in the table are physically stored. Therefore
     table can have &lt;u&gt;only one clustered index&lt;/u&gt;. The leaf nodes of a
     clustered index contain the data pages. &lt;br /&gt;
     A nonclustered index is a special type of index in which the logical order
     of the index does not match the physical stored order of the rows on disk.
     The leaf nodes of a nonclustered index does not consist of the data pages.
     Instead, the leaf nodes contain index rows.&lt;br /&gt;
     Consider using a clustered index for: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;circle&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Columns that contain a large number of distinct
      values. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Queries that return a range of values using
      operators such as BETWEEN, &amp;gt;, &amp;gt;=, &amp;lt;, and &amp;lt;=. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Columns that are accessed sequentially. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Queries that return large result sets.&lt;br /&gt;
      Non-clustered indexes have the same B-tree structure as clustered
      indexes, with two significant differences: &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The data rows are not sorted and stored in order
      based on their non-clustered keys. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The leaf layer of a non-clustered index does not
      consist of the data pages. Instead, the leaf nodes contain index rows.
      Each index row contains the non-clustered key value and one or more row
      locators that point to the data row (or rows if the index is not unique)
      having the key value. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Per table only &lt;u&gt;249 non clustered &lt;/u&gt;indexes.
      &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Disadvantage of index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Every index increases the time
     in takes to perform INSERTS, UPDATES and DELETES, so the number of indexes
     should not be very much. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given a scenario that I have a 10 Clustered Index in a Table to
     all their 10 Columns. What are the advantages and disadvantages?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A: Only 1 clustered index is
     possible. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I enforce to use particular index?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use index hint
     (index=&amp;lt;index_name&amp;gt;) after the table name.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT au_lname FROM authors (index=aunmind)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Index Tuning?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;One of the hardest tasks facing
     database administrators is the selection of appropriate columns for
     non-clustered indexes. You should consider creating non-clustered indexes
     on any columns that are frequently referenced in the WHERE clauses of SQL
     statements. Other good candidates are columns referenced by JOIN and GROUP
     BY operations.&lt;br /&gt;
     You may wish to also consider creating non-clustered indexes that cover
     all of the columns used by certain frequently issued queries. These
     queries are referred to as “covered queries” and experience excellent
     performance gains.&lt;br /&gt;
     Index Tuning is the process of finding appropriate column for
     non-clustered indexes.&lt;br /&gt;
     SQL Server provides a wonderful facility known as the Index Tuning Wizard
     which greatly enhances the index selection process. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between Index defrag and Index rebuild?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When you create an index in the
     database, the index information used by queries is stored in index pages.
     The sequential index pages are chained together by pointers from one page
     to the next. When changes are made to the data that affect the index, the
     information in the index can become scattered in the database. Rebuilding
     an index reorganizes the storage of the index data (and table data in the
     case of a clustered index) to remove fragmentation. This can improve disk
     performance by reducing the number of page reads required to obtain the
     requested data&lt;br /&gt;
     DBCC INDEXDEFRAG - Defragments clustered and secondary indexes of the specified
     table or view.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is sorting and what is the difference between sorting &amp;amp;
     clustered indexes?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The ORDER BY clause &lt;u&gt;sorts&lt;/u&gt;
     query results by one or more columns up to 8,060 bytes. This will happen
     by the time when we retrieve data from database. &lt;u&gt;Clustered indexes&lt;/u&gt;
     physically sorting data, while inserting/updating the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are statistics, under what circumstances they go out of date,
     how do you update them?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Statistics determine the
     selectivity of the indexes. If an indexed column has unique values then
     the selectivity of that index is more, as opposed to an index with
     non-unique values. Query optimizer uses these indexes in determining
     whether to choose an index or not while executing a query.&lt;br /&gt;
     Some situations under which you should update statistics:&lt;br /&gt;
     1) If there is significant change in the key values in the index&lt;br /&gt;
     2) If a large amount of data in an indexed column has been added, changed,
     or removed (that is, if the distribution of key values has changed), or
     the table has been truncated using the TRUNCATE TABLE statement and then
     repopulated&lt;br /&gt;
     3) Database is upgraded from a previous version &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is fillfactor? What is the use of it ? What happens when we
     ignore it? When you should use low fill factor?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When you create a clustered
     index, the data in the table is stored in the data pages of the database
     according to the order of the values in the indexed columns. When new rows
     of data are inserted into the table or the values in the indexed columns
     are changed, Microsoft® SQL Server™ 2000 may have to reorganize the
     storage of the data in the table to make room for the new row and maintain
     the ordered storage of the data. This also applies to nonclustered
     indexes. When data is added or changed, SQL Server may have to reorganize
     the storage of the data in the nonclustered index pages. When a new row is
     added to a full index page, SQL Server moves approximately half the rows
     to a new page to make room for the new row. This reorganization is known
     as a page split. Page splitting can impair performance and fragment the
     storage of the data in a table.&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;When creating an index, you can specify a fill factor to leave extra
     gaps and reserve a percentage of free space on each leaf level page of the
     index to accommodate future expansion in the storage of the table&#39;s data
     and reduce the potential for page splits. The fill factor value is a
     percentage from 0 to 100 that specifies how much to fill the data pages
     after the index is created. A value of 100 means the pages will be full
     and will take the least amount of storage space. This setting should be
     used only when there will be no changes to the data, for example, on a
     read-only table. A lower value leaves more empty space on the data pages,
     which reduces the need to split data pages as indexes grow but requires
     more storage space. This setting is more appropriate when there will be
     changes to the data in the table.&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;br /&gt;
     &lt;b&gt;DATA TYPES&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the data types in SQL &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 357.0pt;&quot; width=&quot;476&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bigint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Binary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bit&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;char&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;cursor&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;datetime&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Decimal&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;float&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;image&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;int&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;money&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ntext&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;nvarchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;real&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;smalldatetime&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Smallint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;smallmoney&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;text&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;timestamp&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 22.0%;&quot; valign=&quot;top&quot; width=&quot;22%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tinyint&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 16.0%;&quot; valign=&quot;top&quot; width=&quot;16%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Varbinary&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 20.0%;&quot; valign=&quot;top&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Varchar&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 24.0%;&quot; valign=&quot;top&quot; width=&quot;24%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;uniqueidentifier&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;43&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between char and nvarchar / char and varchar data-type?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     char[(n)] - Fixed-length non-Unicode character data with length of n
     bytes. n must be a value from 1 through 8,000. Storage size is n bytes.
     The SQL-92 synonym for char is character.&lt;br /&gt;
     nvarchar(n) - Variable-length Unicode character data of n characters. n
     must be a value from 1 through 4,000. Storage size, in bytes, is two times
     the number of characters entered. The data entered can be 0 characters in
     length. The SQL-92 synonyms for nvarchar are national char varying and
     national character varying. &lt;br /&gt;
     varchar[(n)] - Variable-length non-Unicode character data with length of n
     bytes. n must be a value from 1 through 8,000. Storage size is the actual
     length in bytes of the data entered, not n bytes. The data entered can be
     0 characters in length. The SQL-92 synonyms for varchar are char varying
     or character varying. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;GUID datasize?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;128bit &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How GUID becoming unique across machines?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To ensure uniqueness across
     machines, the ID of the network card is used (among others) to compute the
     number. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between text and image data type?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Text and image. Use text for
     character data if you need to store more than 255 characters in SQL Server
     6.5, or more than 8000 in SQL Server 7.0. Use image for binary large
     objects (BLOBs) such as digital images. With text and image data types,
     the data is not stored in the row, so the limit of the page size does not
     apply.All that is stored in the row is a pointer to the database pages
     that contain the data.Individual text, ntext, and image values can be a
     maximum of 2-GB, which is too long to store in a single data row.&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;JOINS&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sometimes we have to select data
     from two or more tables to make our result complete. We have to perform a
     join. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How many types of Joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Joins can be categorized as: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;48&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Inner joins (the typical join operation, which
      uses some comparison operator like = or &amp;lt;&amp;gt;). These include
      equi-joins and natural joins. &lt;br /&gt;
      Inner joins use a comparison operator to match rows from two tables based
      on the values in common columns from each table. For example, retrieving
      all rows where the student identification number is the same in both the &lt;b&gt;students
      &lt;/b&gt;and &lt;b&gt;courses &lt;/b&gt;tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Outer joins. Outer joins can be a left, a right,
      or full outer join. &lt;br /&gt;
      Outer joins are specified with one of the following sets of keywords when
      they are specified in the FROM clause: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;LEFT JOIN or LEFT OUTER JOIN -The result set of
       a left outer join includes all the rows from the left table specified in
       the LEFT OUTER clause, not just the ones in which the joined columns
       match. When a row in the left table has no matching rows in the right
       table, the associated result set row contains null values for all select
       list columns coming from the right table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;RIGHT JOIN or RIGHT OUTER JOIN&amp;nbsp;- A right
       outer join is the reverse of a left outer join. All rows from the right
       table are returned. Null values are returned for the left table any time
       a right table row has no matching row in the left table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;FULL JOIN or FULL OUTER JOIN&amp;nbsp;- A full
       outer join returns all rows in both the left and right tables. Any time
       a row has no match in the other table, the select list columns from the
       other table contain null values. When there is a match between the
       tables, the entire result set row contains data values from the base
       tables. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Cross joins&amp;nbsp;- Cross joins return all rows
      from the left table, each row from the left table is combined with all
      rows from the right table. Cross joins are also called &lt;b&gt;Cartesian
      products.&lt;/b&gt; (A Cartesian join will get you a Cartesian product. A
      Cartesian join is when you join every row of one table to every row of
      another table. You can also get one by joining every row of a table to
      every row of itself.) &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is self join?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table can be joined to itself
     in a self-join. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the differences between UNION and JOINS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A join selects columns from 2 or
     more tables. A union selects rows. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can I improve performance by using the ANSI-style joins instead of
     the old-style joins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Code Example 1:&lt;br /&gt;
     &lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select o.name, i.name&lt;br /&gt;
     from sysobjects o, sysindexes i&lt;br /&gt;
     where o.id = i.id&lt;br /&gt;
     &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Code Example 2:&lt;br /&gt;
     &lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;select o.name, i.name&lt;br /&gt;
     from sysobjects o inner join sysindexes i&lt;br /&gt;
     on o.id = i.id&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You will not get any performance
     gain by switching to the ANSI-style JOIN syntax.&lt;br /&gt;
     Using the ANSI-JOIN syntax gives you an important advantage: Because the
     join logic is cleanly separated from the filtering criteria, you can
     understand the query logic more quickly.&lt;br /&gt;
     The SQL Server old-style JOIN executes the filtering conditions before
     executing the joins, whereas the ANSI-style JOIN reverses this procedure
     (join logic precedes filtering).&lt;br /&gt;
     Perhaps the most compelling argument for switching to the ANSI-style JOIN
     is that Microsoft has explicitly stated that SQL Server will not support
     the old-style OUTER JOIN syntax indefinitely. Another important
     consideration is that the ANSI-style JOIN supports query constructions
     that the old-style JOIN syntax does not support. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 12.0pt; mso-list: l0 level1 lfo4; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is derived table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Derived tables are SELECT
     statements in the FROM clause referred to by an alias or a user-specified
     name. The result set of the SELECT in the FROM clause forms a table used
     by the outer SELECT statement. For example, this SELECT uses a derived
     table to find if any store carries all book titles in the &lt;b&gt;pubs&lt;/b&gt;
     database: &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT ST.stor_id, ST.stor_name&lt;br /&gt;
     FROM stores AS ST,&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT stor_id, COUNT(DISTINCT title_id) AS
     title_count&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM sales&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GROUP BY stor_id&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) AS SA&lt;br /&gt;
     WHERE ST.stor_id = SA.stor_id&lt;br /&gt;
     AND SA.title_count = (SELECT COUNT(*) FROM titles)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;STORED PROCEDURE&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;53&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A stored procedure is a set of
     Structured Query Language (SQL) statements that you assign a name to and
     store in a database in compiled form so that you can share it between a
     number of programs. &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They allow modular programming. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They allow faster execution. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They can reduce network traffic. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;They can be used as a security mechanism. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different types of Storage Procedure?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;1&quot; type=&quot;a&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Temporary
      Stored Procedures - SQL Server supports two types of temporary
      procedures: local and global. A local temporary procedure is visible only
      to the connection that created it. A global temporary procedure is
      available to all connections. Local temporary procedures are
      automatically dropped at the end of the current session. Global temporary
      procedures are dropped at the end of the last session using the
      procedure. Usually, this is when the session that created the procedure
      ends. Temporary procedures named with # and ## can be created by any
      user. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;System
      stored procedures are created and stored in the &lt;b&gt;master&lt;/b&gt; database
      and have the &lt;b&gt;sp_&lt;/b&gt; prefix.(or xp_) System stored procedures can be
      executed from any database without having to qualify the stored procedure
      name fully using the database name &lt;b&gt;master&lt;/b&gt;. (If any user-created
      stored procedure has the same name as a system stored procedure, the
      user-created stored procedure will never be executed.) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Automatically
      Executing Stored Procedures - One or more stored procedures can execute
      automatically when SQL Server starts. The stored procedures must be
      created by the system administrator and executed under the &lt;b&gt;sysadmin&lt;/b&gt;
      fixed server role as a background process. The procedure(s) cannot have
      any input parameters. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo6; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;User stored
      procedure &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;55&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do I mark the stored procedure to automatic execution? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_procoption&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
     system stored procedure to mark the stored procedure to automatic
     execution when the SQL Server will start. Only objects in the master
     database owned by dbo can have the startup setting changed and this option
     is restricted to objects that have no parameters.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE master&lt;br /&gt;
     EXEC sp_procoption &#39;indRebuild&#39;, &#39;startup&#39;, &#39;true&#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will know whether the SQL statements are executed?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When used in a stored procedure,
     the RETURN statement can specify an integer value to return to the calling
     application, batch, or procedure. If no value is specified on RETURN, a
     stored procedure returns the value 0.&amp;nbsp; The stored procedures return a
     value of 0 when no errors were encountered. Any nonzero value indicates an
     error occurred. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Why one should not prefix user stored procedures with sp_?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It is strongly recommended that
     you do not create any stored procedures using sp_ as a prefix. SQL Server
     always looks for a stored procedure beginning with sp_ in this order: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;5&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure in the master database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure based on any qualifiers provided (database name or owner). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo5; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The stored
      procedure using dbo as the owner, if one is not specified. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Therefore, although the
user-created stored procedure prefixed with sp_ may exist in the current
database, the master database is always checked first, even if the stored
procedure is qualified with the database name. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;58&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What can cause a Stored procedure execution plan to become
     invalidated and/or fall out of cache?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Server restart &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Plan is aged out due to low use &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;DBCC FREEPROCCACHE (sometime desired to force
      it) &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When do one need to recompile stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;if a new index is added from
     which the stored procedure might benefit, optimization does not automatically
     happen (until the next time the stored procedure is run after SQL Server
     is restarted). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server provides three ways to recompile a stored procedure: &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;sp_recompile&lt;/b&gt; system stored procedure
      forces a recompile of a stored procedure the next time it is run. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Creating a stored procedure that specifies the
      WITH RECOMPILE option in its definition indicates that SQL Server does
      not cache a plan for this stored procedure; the stored procedure is
      recompiled each time it is executed. Use the WITH RECOMPILE option when
      stored procedures take parameters whose values differ widely between
      executions of the stored procedure, resulting in different execution
      plans to be created each time. Use of this option is uncommon, and causes
      the stored procedure to execute more slowly because the stored procedure
      must be recompiled each time it is executed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo7; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can force the stored procedure to be
      recompiled by specifying the WITH RECOMPILE option when you execute the
      stored procedure. Use this option only if the parameter you are supplying
      is atypical or if the data has significantly changed since the stored
      procedure was created. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;ol start=&quot;61&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find out which stored procedure is recompiling? How to stop
     stored procedures from recompiling? &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;I have Two Stored Procedures SP1 and SP2 as given below. How the
     Transaction works, whether SP2 Transaction succeeds or fails?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE PROCEDURE SP1 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     INSERT INTO MARKS (SID,MARK,CID) VALUES (5,6,3)&lt;br /&gt;
     EXEC SP2&lt;br /&gt;
     ROLLBACK&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     CREATE PROCEDURE SP2 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     INSERT INTO MARKS (SID,MARK,CID) VALUES (100,100,103)&lt;br /&gt;
     commit tran&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Both will get roll backed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE
     PROCEDURE SP1 AS&lt;br /&gt;
     BEGIN TRAN&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO MARKS (SID,MARK,CID) VALUES (5,6,3)&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; BEGIN TRAN&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT INTO STUDENT (SID,NAME1)
     VALUES (1,&#39;SA&#39;)&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp; commit tran&lt;br /&gt;
     ROLLBACK TRAN&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Both will get roll backed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you handle Errors in Sql Stored Procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;INSERT NonFatal VALUES (@Column2)&lt;br /&gt;
     IF @@ERROR &amp;lt;&amp;gt;0&lt;br /&gt;
     &amp;nbsp;BEGIN&lt;br /&gt;
     &amp;nbsp; PRINT &#39;Error Occured&#39;&lt;br /&gt;
     &amp;nbsp;END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;br /&gt;
     &lt;a href=&quot;http://www.sqlteam.com/item.asp?ItemID=2463&quot;&gt;http://www.sqlteam.com/item.asp?ItemID=2463&lt;/a&gt;
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you raise an error in sql?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;RAISERROR&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - Returns a user-defined error message and sets
     a system flag to record that an error has occurred. Using RAISERROR, the
     client can either retrieve an entry from the sysmessages table or build a
     message dynamically with user-specified severity and state information.
     After the message is defined it is sent back to the client as a server
     error message. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;I
     have a stored procedure like&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;commit tran&lt;br /&gt;
     create table a()&lt;br /&gt;
     insert into table b&lt;br /&gt;
     --&lt;br /&gt;
     --&lt;br /&gt;
     rollback tran&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;what will be the result? Is table
     created? data will be inserted in table b? &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How you will return XML from Stored Procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You use the FOR XML clause of
     the SELECT statement, and within the FOR XML clause you specify an XML
     mode: RAW, AUTO, or EXPLICIT. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can a Stored Procedure call itself (recursive). If so then up to
     what level and can it be control?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Stored procedures are nested
     when one stored procedure calls another. You can nest stored procedures up
     to 32 levels. The nesting level increases by one when the called stored
     procedure begins execution and decreases by one when the called stored
     procedure completes execution. Attempting to exceed the maximum of 32
     levels of nesting causes the whole calling stored procedure chain to fail.
     The current nesting level for the stored procedures in execution is stored
     in the @@NESTLEVEL function.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     eg:&lt;br /&gt;
     SET NOCOUNT ON&lt;br /&gt;
     USE master&lt;br /&gt;
     IF OBJECT_ID(&#39;dbo.sp_calcfactorial&#39;) IS NOT NULL&lt;br /&gt;
     DROP PROC dbo.sp_calcfactorial&lt;br /&gt;
     GO&lt;br /&gt;
     CREATE PROC dbo.sp_calcfactorial&lt;br /&gt;
     @base_number int, @factorial int OUT&lt;br /&gt;
     AS&lt;br /&gt;
     DECLARE @previous_number int&lt;br /&gt;
     IF (@base_number&amp;lt;2) SET @factorial=1 -- Factorial of 0 or 1=1&lt;br /&gt;
     ELSE BEGIN&lt;br /&gt;
     SET @previous_number=@base_number-1&lt;br /&gt;
     EXEC dbo.sp_calcfactorial @previous_number, @factorial OUT -- &lt;b&gt;Recursive&lt;/b&gt;
     call&lt;br /&gt;
     IF (@factorial=-1) RETURN(-1) -- Got an error, return&lt;br /&gt;
     SET @factorial=@factorial*@base_number&lt;br /&gt;
     END&lt;br /&gt;
     RETURN(0)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;calling proc&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;br /&gt;
     DECLARE @factorial int &lt;br /&gt;
     EXEC dbo.sp_calcfactorial 4, @factorial OUT &lt;br /&gt;
     SELECT @factorial&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nested Triggers&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are nested when a
     trigger performs an action that initiates another trigger, which can
     initiate another trigger, and so on. Triggers can be nested up to 32
     levels, and you can control whether triggers can be nested through the
     nested triggers server configuration option. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is an extended stored procedure? Can you instantiate a COM
     object by using T-SQL? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;An extended stored procedure is
     a function within a DLL (written in a programming language like C, C++
     using Open Data Services (ODS) API) that can be called from T-SQL, just
     the way we call normal stored procedures using the EXEC statement. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between view and stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views can have only select
     statements (create, update, truncate, delete statements are not allowed)
     Views cannot have “select into”, “Group by” “Having”, ”Order by” &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a Function &amp;amp; what are the different user defined
     functions?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Function is a saved Transact-SQL
     routine that returns a value. User-defined functions cannot be used to
     perform a set of actions that modify the global database state. User-defined
     functions, like system functions, can be invoked from a query. They also
     can be executed through an EXECUTE statement like stored procedures. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;11&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Scalar Functions&lt;br /&gt;
      Functions are scalar-valued if the RETURNS clause specified one of the
      scalar &lt;u&gt;data types&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Inline Table-valued Functions&lt;br /&gt;
      If the &lt;u&gt;RETURNS clause specifies TABLE&lt;/u&gt; with no accompanying column
      list, the function is an inline function. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l1 level2 lfo8; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Multi-statement Table-valued Functions&lt;br /&gt;
      If the &lt;u&gt;RETURNS clause specifies a TABLE type with columns and their
      data types&lt;/u&gt;, the function is a multi-statement table-valued function. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;73&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the difference between a function and a stored procedure?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions &lt;u&gt;can be used in a select statement&lt;/u&gt;
      where as procedures cannot &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Procedure takes &lt;u&gt;both input and output&lt;/u&gt;
      parameters but Functions takes only input parameters &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions &lt;u&gt;cannot return values of type text,
      ntext, image &amp;amp; timestamps&lt;/u&gt; where as procedures can &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Functions can be used as user defined datatypes
      in create table but procedures cannot &lt;br /&gt;
      ***Eg:-create table &amp;lt;tablename&amp;gt;(name varchar(10),salary
      getsal(name))&lt;br /&gt;
      Here getsal is a user defined function which returns a salary type, when
      table is created no storage is allotted for salary type, and getsal
      function is also not executed, But when we are fetching some values from
      this table, getsal function get’s executed and the return &lt;br /&gt;
      Type is returned as the result set. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How
     to debug a stored procedure?&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;TRIGGER&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Trigger? What is its use? What are the types of Triggers?
     What are the new kinds of triggers in sql 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are a special class of
     stored procedure &lt;u&gt;defined to execute automatically when an UPDATE,
     INSERT, or DELETE statement is issued against a table or view&lt;/u&gt;.
     Triggers are powerful tools that sites can &lt;u&gt;use to enforce their
     business rules automatically when data is modified&lt;/u&gt;.&lt;br /&gt;
     The CREATE TRIGGER statement can be defined with the FOR UPDATE, FOR
     INSERT, or FOR DELETE clauses to target a trigger to a specific class of
     data modification actions. When FOR UPDATE is specified, the &lt;u&gt;IF UPDATE
     (column_name) clause&lt;/u&gt; can be used to target a trigger to updates
     affecting a particular column.&lt;br /&gt;
     You can use the FOR clause to specify when a trigger is executed: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;AFTER (default) - The trigger &lt;u&gt;executes after
      the statement that triggered it completes&lt;/u&gt;. If the statement fails
      with an error, such as a constraint violation or syntax error, the
      trigger is not executed. AFTER triggers cannot be specified for views. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;INSTEAD OF -The trigger executes in place of the
      triggering action. INSTEAD OF triggers can be specified on both tables
      and views. You can define &lt;u&gt;only one INSTEAD OF trigger for each
      triggering action&lt;/u&gt; (INSERT, UPDATE, and DELETE). INSTEAD OF triggers
      can be used to perform enhance integrity checks on the data values
      supplied in INSERT and UPDATE statements. INSTEAD OF triggers also let
      you specify actions that allow views, which would normally not support
      updates, to be updatable.&lt;br /&gt;
      An INSTEAD OF trigger can take actions such as: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ignoring parts of a batch. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Not processing a part of a batch and logging
       the problem rows. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level3 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Taking an alternative action if an error
       condition is encountered. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In SQL Server 6.5 you could
define only 3 triggers per table, one for INSERT, one for UPDATE and one for
DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could
create multiple triggers per each action. But in 7.0 there&#39;s no way to control
the order in which the triggers fire. In SQL Server 2000 you could specify &lt;u&gt;which
trigger fires first or fires last using &lt;/u&gt;&lt;/span&gt;&lt;u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_settriggerorder&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Till SQL Server 7.0, triggers fire only after the data modification operation
happens. So in a way, they are called post triggers. But in SQL Server 2000 you
could create pre triggers also. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;76&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When should one use &quot;instead of Trigger&quot;? Example&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE BaseTable&lt;br /&gt;
     (&lt;br /&gt;
     PrimaryKey int IDENTITY(1,1),&lt;br /&gt;
     Color nvarchar(10) NOT NULL,&lt;br /&gt;
     Material nvarchar(10) NOT NULL,&lt;br /&gt;
     ComputedCol AS (Color + Material)&lt;br /&gt;
     )&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     --Create a view that contains all columns from the base table.&lt;br /&gt;
     CREATE VIEW InsteadView&lt;br /&gt;
     AS SELECT PrimaryKey, Color, Material, ComputedCol&lt;br /&gt;
     FROM BaseTable&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     --Create an INSTEAD OF INSERT trigger on tthe view.&lt;br /&gt;
     CREATE TRIGGER InsteadTrigger on InsteadView&lt;br /&gt;
     INSTEAD OF INSERT&lt;br /&gt;
     AS&lt;br /&gt;
     BEGIN&lt;br /&gt;
     --Build an INSERT statement ignoring inserrted.PrimaryKey and &lt;br /&gt;
     --inserted.ComputedCol.&lt;br /&gt;
     INSERT INTO BaseTable&lt;br /&gt;
     SELECT Color, Material&lt;br /&gt;
     FROM inserted&lt;br /&gt;
     END&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     -- can insert value to basetable by this insert into
     basetable(color,material) values (&#39;red&#39;,&#39;abc&#39;)&lt;br /&gt;
     &lt;br /&gt;
     -- insert into InsteadView(color,material)) values (&#39;red&#39;,&#39;abc&#39;) can&#39;t do
     this.&lt;br /&gt;
     -- It will give error &quot;&#39;PrimaryKey&#39; iin table &#39;InsteadView&#39; cannot be
     null.&quot;&lt;br /&gt;
     &lt;br /&gt;
     -- can insert value through table by this&amp;lt;&lt;br /&gt;
     insert into InsteadView values (1,&#39;red&#39;,&#39;abc&#39;,1) --PrimaryKey, ComputedCol
     wont take values from here&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between trigger and stored procedure?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Trigger will get execute
     automatically when an UPDATE, INSERT, or DELETE statement is issued
     against a table or view.&lt;br /&gt;
     We have to call stored procedure manually, or it can execute automatic
     when the SQL Server starts (You can use the &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_procoption&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; system stored procedure to mark the stored
     procedure to automatic execution when the SQL Server will start. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The following trigger generates an e-mail whenever a new title is
     added.&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TRIGGER reminder&lt;br /&gt;
     ON titles&lt;br /&gt;
     FOR INSERT&lt;br /&gt;
     AS&lt;br /&gt;
     EXEC master..xp_sendmail &#39;MaryM&#39;, &#39;New title, mention in the next report
     to distributors.&#39;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Drawback of trigger? Its alternative solution?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Triggers are generally used to
     implement business rules, auditing. Triggers can also be used to extend
     the referential integrity checks, but wherever possible, use constraints
     for this purpose, instead of triggers, as constraints are much faster.&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;LOCK&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server™ 2000 uses
     locking to ensure transactional integrity and database consistency.
     Locking prevents users from reading data being changed by other users, and
     prevents multiple users from changing the same data at the same time. If
     locking is not used, data within the database may become logically
     incorrect, and queries executed against that data may produce unexpected
     results. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different types of locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server uses these resource
     lock modes. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Lock mode&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Shared (S)&lt;/span&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used for operations that do
  not change or update data (read-only operations), such as a SELECT statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Update (U)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used on resources that can
  be updated. Prevents a common form of deadlock that occurs when multiple
  sessions are reading, locking, and potentially updating resources later.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Exclusive (X)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used for data-modification
  operations, such as INSERT, UPDATE, or DELETE. Ensures that multiple updates
  cannot be made to the same resource at the same time.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Intent&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used to establish a lock
  hierarchy. The types of intent locks are: intent shared (IS), intent
  exclusive (IX), and shared with intent exclusive (SIX).&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Schema&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used when an operation
  dependent on the schema of a table is executing. The types of schema locks
  are: schema modification (Sch-M) and schema stability (Sch-S). &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bulk Update (BU)&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in;&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Used when bulk-copying data
  into a table and the TABLOCK hint is specified.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;82&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a dead lock? Give a practical sample? How you can minimize
     the deadlock situation? What is a deadlock and what is a live lock? How
     will you go about resolving deadlocks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Deadlock is a situation when two
     processes, &lt;u&gt;each having a lock on one piece of data, attempt to acquire
     a lock on the other&#39;s piece&lt;/u&gt;. Each process&amp;nbsp; would wait
     indefinitely for the other to release the lock, unless one of the user
     processes is terminated. SQL Server detects deadlocks and terminates one
     user&#39;s process.&lt;br /&gt;
     A livelock is one, where a&amp;nbsp;&lt;u&gt;request for an exclusive lock is
     repeatedly denied because a series of overlapping shared locks keeps
     interfering&lt;/u&gt;. SQL Server detects the situation after four denials and &lt;u&gt;refuses
     further shared locks&lt;/u&gt;. (A livelock also occurs when read transactions
     monopolize a table or page, forcing a write transaction to wait
     indefinitely.) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is isolation level?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;An isolation level determines
     the degree of isolation of data between concurrent transactions. The
     default SQL Server isolation level is Read Committed. A lower isolation
     level increases concurrency, but at the expense of data correctness.
     Conversely, a higher isolation level ensures that data is correct, but can
     affect concurrency negatively. The isolation level required by an
     application determines the locking behavior SQL Server uses.&lt;br /&gt;
     SQL-92 defines the following isolation levels, all of which are supported
     by SQL Server: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read uncommitted (the lowest level where
      transactions are isolated only enough to ensure that physically corrupt
      data is not read). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read committed (SQL Server default level). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Repeatable read. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Serializable (the highest level, where
      transactions are completely isolated from one another). &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 352.2pt;&quot; width=&quot;470&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Isolation level&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dirty read&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Nonrepeatable read&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Phantom&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read uncommitted&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Read committed&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Repeatable read&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 30.0%;&quot; valign=&quot;top&quot; width=&quot;30%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Serializable&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 21.0%;&quot; valign=&quot;top&quot; width=&quot;21%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 31.0%;&quot; valign=&quot;top&quot; width=&quot;31%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 18.0%;&quot; valign=&quot;top&quot; width=&quot;18%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;84&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Uncommitted Dependency (Dirty Read)&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - Uncommitted dependency occurs when a second
     transaction selects a row that is being updated by another transaction.
     The second transaction is reading data that has not been committed yet and
     may be changed by the transaction updating the row. For example, an editor
     is making changes to an electronic document. During the changes, a second
     editor takes a copy of the document that includes all the changes made so
     far, and distributes the document to the intended audience.&lt;br /&gt;
     &lt;u&gt;Inconsistent Analysis (Nonrepeatable Read)&lt;/u&gt; Inconsistent analysis
     occurs when a second transaction accesses the same row several times and
     reads different data each time. Inconsistent analysis is similar to
     uncommitted dependency in that another transaction is changing the data
     that a second transaction is reading. However, in inconsistent analysis,
     the data read by the second transaction was committed by the transaction
     that made the change. Also, inconsistent analysis involves multiple reads
     (two or more) of the same row and each time the information is changed by
     another transaction; thus, the term nonrepeatable read. For example, an
     editor reads the same document twice, but between each reading, the writer
     rewrites the document. When the editor reads the document for the second
     time, it has changed.&lt;br /&gt;
     &lt;u&gt;Phantom Reads&lt;/u&gt; Phantom reads occur when an insert or delete action
     is performed against a row that belongs to a range of rows being read by a
     transaction. The transaction&#39;s first read of the range of rows shows a row
     that no longer exists in the second or succeeding read, as a result of a
     deletion by a different transaction. Similarly, as the result of an insert
     by a different transaction, the transaction&#39;s second or succeeding read
     shows a row that did not exist in the original read. For example, an
     editor makes changes to a document submitted by a writer, but when the
     changes are incorporated into the master copy of the document by the
     production department, they find that new unedited material has been added
     to the document by the author. This problem could be avoided if no one
     could add new material to the document until the editor and production
     department finish working with the original document. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;nolock? What is the difference between the REPEATABLE READ and
     SERIALIZE isolation levels?&lt;br /&gt;
     Locking Hints - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A range of
     table-level locking hints can be specified using the SELECT, INSERT,
     UPDATE, and DELETE statements to direct Microsoft® SQL Server 2000 to the
     type of locks to be used. Table-level locking hints can be used when a
     finer control of the types of locks acquired on an object is required.
     These locking hints override the current transaction isolation level for
     the session. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 80.0%;&quot; width=&quot;80%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Locking hint&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;HOLDLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Hold a shared lock until
  completion of the transaction instead of releasing the lock as soon as the
  required table, row, or data page is no longer required. HOLDLOCK is
  equivalent to SERIALIZABLE.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;NOLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Do not issue shared locks
  and do not honor exclusive locks. When this option is in effect, it is
  possible to read an uncommitted transaction or a set of pages that are rolled
  back in the middle of a read. Dirty reads are possible. Only applies to the
  SELECT statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;PAGLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use page locks where a
  single table lock would usually be taken.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READCOMMITTED&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the READ COMMITTED
  isolation level. By default, SQL Server 2000 operates at this isolation
  level.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READPAST&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Skip locked rows. This
  option causes a transaction to skip rows locked by other transactions that
  would ordinarily appear in the result set, rather than block the transaction
  waiting for the other transactions to release their locks on these rows. The
  READPAST lock hint applies only to transactions operating at READ COMMITTED
  isolation and will read only past row-level locks. Applies only to the SELECT
  statement.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;READUNCOMMITTED&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Equivalent to NOLOCK.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;REPEATABLEREAD&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the REPEATABLE READ
  isolation level. &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ROWLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use row-level locks instead
  of the coarser-grained page- and table-level locks.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SERIALIZABLE&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform a scan with the
  same locking semantics as a transaction running at the SERIALIZABLE isolation
  level. Equivalent to HOLDLOCK.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TABLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use a table lock instead of
  the finer-grained row- or page-level locks. SQL Server holds this lock until
  the end of the statement. However, if you also specify HOLDLOCK, the lock is
  held until the end of the transaction.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TABLOCKX&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use an exclusive lock on a
  table. This lock prevents others from reading or updating the table and is
  held until the end of the statement or transaction.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;UPDLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use update locks instead of
  shared locks while reading a table, and hold locks until the end of the
  statement or transaction. UPDLOCK has the advantage of allowing you to read
  data (without blocking other readers) and update it later with the assurance
  that the data has not changed since you last read it.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 105.0pt;&quot; valign=&quot;top&quot; width=&quot;140&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;XLOCK&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 79.0%;&quot; valign=&quot;top&quot; width=&quot;79%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use an exclusive lock that
  will be held until the end of the transaction on all data processed by the
  statement. This lock can be specified with either PAGLOCK or TABLOCK, in
  which case the exclusive lock applies to the appropriate level of
  granularity.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;86&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;For
     example, if the transaction isolation level is set to SERIALIZABLE, and
     the table-level locking hint NOLOCK is used with the SELECT statement,
     key-range locks typically used to maintain serializable transactions are
     not taken.&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     SET TRANSACTION ISOLATION LEVEL SERIALIZABLE&lt;br /&gt;
     GO&lt;br /&gt;
     BEGIN TRANSACTION&lt;br /&gt;
     SELECT au_lname FROM authors WITH (NOLOCK)&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is escalation of locks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Lock escalation is the process
     of converting a lot of low level locks (like row locks, page locks) into
     higher level locks (like table locks). Every lock is a memory structure
     too many locks would mean, more memory being occupied by locks. To prevent
     this from happening, SQL Server escalates the many fine-grain locks to
     fewer coarse-grain locks. Lock escalation threshold was definable in SQL
     Server 6.5, but from SQL Server 7.0 onwards it&#39;s dynamically managed by
     SQL Server.&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;VIEW&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is View? Use? Syntax of View?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A view is a virtual table made
     up of data from base tables and other views, but not stored separately. &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views simplify users perception of the database
      (can be used to present only the necessary information while hiding
      details in underlying relations) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views improve data security preventing undesired
      accesses &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views facilite the provision of additional data
      independence &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Does the View occupy memory space?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;No &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Can u drop a table if it has a view?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Views or tables participating in
     a view created &lt;u&gt;with the SCHEMABINDING clause cannot be dropped&lt;/u&gt;. If
     the view is not created using SCHEMABINDING, then we can drop the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Why doesn&#39;t SQL Server permit an ORDER BY clause in the definition
     of a view?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Server excludes an ORDER BY
     clause from a view to comply with the ANSI SQL-92 standard. Because
     analyzing the rationale for this standard requires a discussion of the
     underlying structure of the structured query language (SQL) and the
     mathematics upon which it is based, we can&#39;t fully explain the restriction
     here. However, if you need to be able to specify an ORDER BY clause in a
     view, consider using the following workaround:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO &lt;br /&gt;
     CREATE VIEW AuthorsByName&lt;br /&gt;
     AS&lt;br /&gt;
     SELECT TOP 100 PERCENT *&lt;br /&gt;
     FROM authors &lt;br /&gt;
     ORDER BY au_lname, au_fname&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The TOP construct, which Microsoft
     introduced in SQL Server 7.0, is most useful when you combine it with the
     ORDER BY clause. The only time that SQL Server supports an ORDER BY clause
     in a view is when it is used in conjunction with the TOP keyword. (Note
     that the TOP keyword is a SQL Server extension to the ANSI SQL-92
     standard.)&lt;br /&gt;
     &lt;br /&gt;
     &lt;b&gt;TRANSACTION&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Transaction?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A transaction is a sequence of
     operations performed as a single logical unit of work. A logical unit of
     work must exhibit four properties, called the ACID (Atomicity, Consistency,
     Isolation, and Durability) properties, to qualify as a transaction: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Atomicity - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A transaction must be an atomic unit of work; &lt;u&gt;either all of
      its data modifications are performed or none &lt;/u&gt;of them is performed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Consistency - &lt;/span&gt;&lt;/b&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When completed, a transaction must leave all
      data in a consistent&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; state. In
      a relational database, all rules must be applied to the transaction&#39;s
      modifications to maintain all data integrity. All internal data
      structures, such as B-tree indexes or doubly-linked lists, must be correct
      at the end of the transaction. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Isolation - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Modifications &lt;u&gt;made by concurrent transactions must be isolated&lt;/u&gt;
      from the modifications made by any other concurrent transactions. A
      transaction either sees data in the state it was in before another
      concurrent transaction modified it, or it sees the data after the second
      transaction has completed, but it does not see an intermediate state.
      This is referred to as serializability because it results in the ability
      to reload the starting data and replay a series of transactions to end up
      with the data in the same state it was in after the original transactions
      were performed. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Durability - &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After a transaction has completed, its &lt;u&gt;effects are permanently&lt;/u&gt;
      in place in the system. The modifications persist even in the event of a
      system failure. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After one Begin Transaction a truncate statement and a RollBack
     statements are there.&amp;nbsp;Will it be rollbacked? Since the truncate
     statement does not perform logged operation how does it RollBack?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;It will rollback.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Given
     a SQL like &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Begin Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     Commit Tran&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     RollBack&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;br /&gt;
     RollBack&lt;br /&gt;
     &amp;nbsp;&amp;nbsp; Select @@Rowcount&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     What is the value of @@Rowcount at each stmt levels?&lt;br /&gt;
     Ans : 0 – zero.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@ROWCOUNT&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
     Returns the number of rows affected by the last statement.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@TRANCOUNT&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
     Returns the number of active transactions for the current connection.&lt;br /&gt;
     Each Begin Tran will add count, each commit will reduce count and ONE
     rollback will make it 0.&lt;br /&gt;
     &lt;br /&gt;
     OTHER &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the constraints for Table Constraints define rules
     regarding the values allowed in columns and are the standard mechanism for
     enforcing integrity. SQL Server 2000 supports five classes of constraints.&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;NOT NULL&lt;br /&gt;
     CHECK&lt;br /&gt;
     UNIQUE&lt;br /&gt;
     PRIMARY KEY&lt;br /&gt;
     FOREIGN KEY&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are 50 columns in a table. Write a query to get first 25
     columns&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ans: Need to mention each column
     names. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to list all the tables in a particular database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     sp_help&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are cursors? Explain different types of cursors. What are the
     disadvantages of cursors? How can you avoid cursors?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Cursors allow row-by-row
     processing of the result sets.&lt;br /&gt;
     &lt;u&gt;Types&lt;/u&gt; of cursors: Static, Dynamic, Forward-only, Keyset-driven.&lt;br /&gt;
     &lt;u&gt;Disadvantages&lt;/u&gt; of cursors: Each time you fetch a row from the
     cursor, it results in a network roundtrip. Cursors are also costly because
     they require more resources and temporary storage (results in more IO
     operations). Further, there are restrictions on the SELECT statements that
     can be used with some types of cursors.&lt;br /&gt;
     &lt;u&gt;How to avoid cursor:&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Most of the times, set based operations can be
      used instead of cursors. Here is an example: If you have to give a flat
      hike to your employees using the following criteria:&lt;br /&gt;
      Salary between 30000 and 40000 -- 5000 hike&lt;br /&gt;
      Salary between 40000 and 55000 -- 7000 hike&lt;br /&gt;
      Salary between 55000 and 65000 -- 9000 hike&lt;br /&gt;
      In this situation many developers tend to use a cursor, determine each
      employee&#39;s salary and update his salary according to the above formula.
      But the same can be achieved by multiple update statements or can be
      combined in a single UPDATE statement as shown below:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
      UPDATE tbl_emp SET salary =&lt;br /&gt;
      CASE WHEN salary BETWEEN 30000 AND 40000 THEN salary + 5000&lt;br /&gt;
      WHEN salary BETWEEN 40000 AND 55000 THEN salary + 7000&lt;br /&gt;
      WHEN salary BETWEEN 55000 AND 65000 THEN salary + 10000&lt;br /&gt;
      END&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You need to call a stored procedure when a
      column in a particular row meets certain condition. You don&#39;t have to use
      cursors for this. This can be achieved using WHILE loop, as long as there
      is a unique key to identify each row. For examples of using WHILE loop
      for row by row processing, check out the &#39;My code library&#39; section of my
      site or search for WHILE. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Dynamic Cursor? Suppose, I have a dynamic cursor attached
     to table in a database.&amp;nbsp; I have another means by which I will modify
     the table.&amp;nbsp; What do you think will the values in the cursor be?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dynamic cursors reflect all
     changes made to the rows in their result set when scrolling through the
     cursor. The data values, order, and membership of the rows in the result
     set can change on each fetch. All UPDATE, INSERT, and DELETE statements
     made by all users are visible through the cursor. Updates are visible
     immediately if they are made through the cursor using either an API
     function such as SQLSetPos or the Transact-SQL WHERE CURRENT OF clause.
     Updates made outside the cursor are not visible until they are committed,
     unless the cursor transaction isolation level is set to read uncommitted. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DATEPART?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Returns an integer representing
     the specified datepart of the specified date. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between Delete and Truncate?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;TRUNCATE TABLE is functionally
     identical to DELETE statement with no WHERE clause: both remove all rows
     in the table.&lt;br /&gt;
     (1) But TRUNCATE TABLE is faster and uses fewer system and transaction log
     resources than DELETE. The DELETE statement removes rows &lt;u&gt;one at a time
     and records an entry in the transaction log&lt;/u&gt; for each deleted row.
     TRUNCATE TABLE removes the data by deallocating the data pages used to
     store the table&#39;s data, and &lt;u&gt;only the page deallocations&lt;/u&gt; are
     recorded in the transaction log.&lt;br /&gt;
     (2) Because TRUNCATE TABLE is not logged, it &lt;u&gt;cannot activate a trigger&lt;/u&gt;.&lt;br /&gt;
     (3) The &lt;u&gt;counter&lt;/u&gt; used by an identity for new rows is &lt;u&gt;reset&lt;/u&gt; to
     the seed for the column. If you want to retain the identity counter, use
     DELETE instead.&lt;br /&gt;
     Of course, TRUNCATE TABLE can be rolled back. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are global variables? Tell me some of them?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transact-SQL global variables
     are a form of function and are now referred to as functions.&lt;br /&gt;
     ABS - Returns the absolute, positive value of the given numeric
     expression.&lt;br /&gt;
     SUM&lt;br /&gt;
     AVG&lt;br /&gt;
     AND &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DDL?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data definition language (DDL)
     statements are SQL statements that support the definition or declaration
     of database objects (for example, CREATE TABLE, DROP TABLE, and ALTER
     TABLE).&lt;br /&gt;
     You can use the ADO Command object to issue DDL statements. To
     differentiate DDL statements from a table or stored procedure name, set
     the CommandType property of the Command object to adCmdText. Because
     executing DDL queries with this method does not generate any recordsets,
     there is no need for a Recordset object. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DML?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data Manipulation Language
     (DML), which is used to select, insert, update, and delete data in the
     objects defined using DDL &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are keys in RDBMS? What is a primary key/ foreign key?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are two kinds of keys.&lt;br /&gt;
     A primary key is a set of columns from a table that are guaranteed to have
     unique values for each row of that table.&lt;br /&gt;
     Foreign keys are attributes of one table that have matching values in a &lt;b&gt;primary
     key&lt;/b&gt; in another table, allowing for relationships between tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between Primary Key and Unique Key?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Both primary key and unique key
     enforce uniqueness of the column on which they are defined. But by default
     primary key creates a &lt;u&gt;clustered index&lt;/u&gt; on the column, where are
     unique creates a &lt;u&gt;nonclustered index by default&lt;/u&gt;. Another major
     difference is that, primary key &lt;u&gt;doesn&#39;t allow NULLs&lt;/u&gt;, but unique key
     &lt;u&gt;allows one NULL&lt;/u&gt; only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Define candidate key, alternate key, composite key?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     A &lt;u&gt;candidate key is one that can identify each row of a table uniquely&lt;/u&gt;.
     Generally a candidate key becomes the primary key of the table. If the
     table has more than one candidate key, one of them will become the primary
     key, and the rest are called alternate keys. &lt;br /&gt;
     A key formed by combining at least two or more columns is called composite
     key. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the Referential Integrity?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Referential integrity refers to
     the consistency that must be maintained between primary and foreign keys,
     i.e. every foreign key value must have a corresponding primary key value. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are defaults? Is there a column to which a default can&#39;t be
     bound?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     A default is a value that will be used by a column, if no value is
     supplied to that column while inserting data. IDENTITY columns and
     timestamp columns can&#39;t have defaults bound to them. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Query optimization? How is tuning a performance of query
     done? &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the use of shell commands? xp_cmdshell&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Executes a given command string
     as an operating-system command shell and returns any output as rows of
     text. Grants nonadministrative users permissions to execute &lt;b&gt;xp_cmdshell&lt;/b&gt;.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is use of shrink database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server 2000
     allows &lt;u&gt;each file within a database to be shrunk to remove unused pages&lt;/u&gt;.
     Both data and transaction log files can be shrunk. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If the performance of the query suddenly decreased where you will
     check?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a pass-through query?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server 2000 sends
     pass-through queries as un-interpreted query strings to an OLE DB data
     source. The query must be in a syntax the OLE DB data source will accept.
     A Transact-SQL statement uses the results from a pass-through query as
     though it is a regular table reference.&lt;br /&gt;
     This example uses a pass-through query to retrieve a result set from a
     Microsoft Access version of the Northwind sample database.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM OpenRowset(&#39;Microsoft.Jet.OLEDB.4.0&#39;, &lt;br /&gt;
     &#39;c:\northwind.mdb&#39;;&#39;admin&#39;; &#39;&#39;, &lt;br /&gt;
     &#39;SELECT CustomerID, CompanyName&lt;br /&gt;
     FROM Customers&lt;br /&gt;
     WHERE Region = &#39;&#39;WA&#39;&#39; &#39;)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you differentiate Local and Global Temporary table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can create local and global
     temporary tables. Local temporary tables are visible only in the current
     session; global temporary tables are visible to all sessions. Prefix local
     temporary table names with single number sign (#&lt;i&gt;table_name&lt;/i&gt;), and
     prefix global temporary table names with a double number sign (##&lt;i&gt;table_name&lt;/i&gt;).
     SQL statements reference the temporary table using the value specified for
     &lt;i&gt;table_name&lt;/i&gt; in the CREATE TABLE statement:&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;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;CREATE TABLE #MyTempTable (cola INT PRIMARY KEY)&lt;br /&gt;
     INSERT INTO #MyTempTable VALUES (1) &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How the Exists keyword works in SQL Server?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;code&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;USE pubs&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;code&gt;SELECT au_lname, au_fname&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;FROM authors&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;WHERE exists&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; (SELECT *&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; FROM publishers&lt;/code&gt;&lt;br /&gt;
     &lt;code&gt;&amp;nbsp;&amp;nbsp; WHERE authors.city = publishers.city)&lt;/code&gt;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When a subquery is introduced with
     the keyword EXISTS, it functions as an existence test. The WHERE clause of
     the outer query tests for the existence of rows returned by the subquery.
     The subquery &lt;u&gt;does not actually produce any data; it returns a value of
     TRUE or FALSE&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ANY?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     SELECT au_lname, au_fname&lt;br /&gt;
     FROM authors&lt;br /&gt;
     WHERE city = ANY&lt;br /&gt;
     (SELECT city&lt;br /&gt;
     FROM publishers) &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;to select date part only&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT CONVERT(char(10),GetDate(),101)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;--to select time part only&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT right(GetDate(),7)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I send a message to user from the SQL Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the xp_cmdshell
     extended stored procedure to run net send command. This is the example to
     send the &#39;Hello&#39; message to JOHN:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;EXEC master..xp_cmdshell &quot;net send JOHN
     &#39;Hello&#39;&quot;&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To get net send message on the
     Windows 9x machines, you should run the WinPopup utility. You can place
     WinPopup in the Startup group under Program Files. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is normalization? Explain different levels of normalization?
     Explain Third normalization form with an example?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The process of refining tables,
     keys, columns, and relationships to create an efficient database is called
     &lt;i&gt;normalization&lt;/i&gt;. This should eliminates unnecessary duplication and
     provides a rapid search path to all necessary information.&lt;br /&gt;
     Some of the benefits of normalization are: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Data integrity (because there is no redundant,
      neglected data) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Optimized queries (because normalized tables
      produce rapid, efficient joins) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Faster index creation and sorting (because the
      tables have fewer columns) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Faster UPDATE performance (because there are
      fewer indexes per table) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Improved concurrency resolution (because table
      locks will affect less data) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate redundancy &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are a few rules for
database normalization. Each rule is called a &quot;normal form.&quot; If the
first rule is observed, the database is said to be in &quot;first normal
form.&quot; If the first three rules are observed, the database is considered
to be in &quot;third normal form.&quot; Although other levels of normalization
are possible, third normal form is considered the highest level necessary for
most applications. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;First
      Normal Form (1NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate repeating groups&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; in individual tables &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create a &lt;u&gt;separate table for each set of
       related data&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identify each set of related data with a &lt;u&gt;primary
       key&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Do not use multiple fields in
a single table to store similar data. &lt;br /&gt;
Example &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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate1 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate2 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate3 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate4 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Beth &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jason &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Carol &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.6pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &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;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate duplicative columns
from the same table.&amp;nbsp; Clearly, the Subordinate1-Subordinate4 columns are
duplicative. What happens when we need to add or remove a subordinate? &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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinates&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim, Mary, Beth&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike, Jason, Carol, Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 88.55pt;&quot; width=&quot;118&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 141.6pt;&quot; width=&quot;189&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan&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;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;This solution is closer, but
it also falls short of the mark. The subordinates column is still duplicative
and non-atomic. What happens when we need to add or remove a subordinate? We
need to read and write the entire contents of the table. That’s not a big deal
in this situation, but what if one manager had one hundred employees? Also, it
complicates the process of selecting data from the database in future queries. &lt;br /&gt;
Solution:&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; margin-left: 1.0in; mso-padding-alt: 0in 0in 0in 0in; width: 113.4pt;&quot; width=&quot;151&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Subordinate&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Bob &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Beth &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mike &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jason &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Carol &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mary &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mark &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 60.6pt;&quot; width=&quot;81&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Jim &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 0in 0in 0in; width: 79.8pt;&quot; width=&quot;106&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alan &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;2&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Second
      Normal Form (2NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create &lt;u&gt;separate tables for sets of values
       that apply to multiple records.&lt;/u&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Relate these tables with a&lt;u&gt; foreign key&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Records should not depend on
anything other than a table&#39;s primary key (a compound key, if necessary). &lt;br /&gt;
For example, consider a customer&#39;s address in an accounting system. The address
is needed by the Customers table, but also by the Orders, Shipping, Invoices,
Accounts Receivable, and Collections tables. Instead of storing the customer&#39;s
address as a separate entry in each of these tables, store it in one place,
either in the Customers table or in a separate Addresses table. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;3&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Third
      Normal Form (3NF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;square&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level3 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Eliminate fields that do not depend on the key&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Values in a record that are
not part of that record&#39;s key do not belong in the table. In general, any time
the contents of a group of fields may apply to more than a single record in the
table, consider placing those fields in a separate table.&lt;br /&gt;
For example, in an Employee Recruitment table, a candidate&#39;s university name
and address may be included. But you need a complete list of universities for
group mailings. If university information is stored in the Candidates table,
there is no way to list universities with no current candidates. Create a
separate Universities table and link it to the Candidates table with a
university code key.&lt;br /&gt;
Another Example : &lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.55in;&quot; width=&quot;437&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MemberId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Company&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; height: .1in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CompanyLoc&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; height: .15in; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;John Smith&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ABC&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alabama&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; height: .15in; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dave Jones&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MCI&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; height: .15in; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Florida&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Member table
satisfies first normal form - it contains no repeating groups. It satisfies
second normal form - since it doesn&#39;t have a multivalued key. But the key is
MemberID, and the company name and location describe only a company, not a
member. To achieve third normal form, they must be moved into a separate table.
Since they describe a company, CompanyCode becomes the key of the new
&quot;Company&quot; table.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The motivation for
this is the same for second normal form: we want to avoid update and delete
anomalies. For example, suppose no members from the IBM were currently stored
in the database. With the previous design, there would be no record of its
existence, even though 20 past members were from IBM!&lt;br /&gt;
&lt;u&gt;Member Table &lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.05in;&quot; width=&quot;389&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MemberId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CID&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;John Smith&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Dave Jones&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;margin-left: 1.0in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
&lt;u&gt;Company Table &lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 4.05in;&quot; width=&quot;389&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: .1in;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;CId&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 98.4pt;&quot; width=&quot;131&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Name&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; height: .1in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;mso-line-height-alt: 7.2pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Location&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;ABC&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Alabama&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: .15in; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 78.6pt;&quot; width=&quot;105&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 53.4pt;&quot; width=&quot;71&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;MCI&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; height: .15in; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 49.8pt;&quot; width=&quot;66&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Florida&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;4&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Boyce-Codd
      Normal Form (BCNF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A relation is in Boyce/Codd
      normal form if and only if the only determinants are candidate key. Its a
      different version of 3NF, indeed, was meant to replace it. [A determinant
      is any attribute on which some other attribute is (fully) functionally
      dependent.] &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;4th
      Normal Form (4NF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table is in 4NF if it is in
      BCNF and if it has no multi-valued dependencies. This applies primarily
      to key-only associative tables, and appears as a ternary relationship,
      but has incorrectly merged 2 distinct, independent relationships.&lt;br /&gt;
      Eg: This could be any 2 M:M relationships from a single entity. For
      instance, a member could know many software tools, and a software tool
      may be used by many members. Also, a member could have recommended many
      books, and a book could be recommended by many members. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-bottom-alt: .25pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: outset; mso-border-top-alt: .25pt; mso-padding-alt: 0in 0in 0in 0in; width: 60.0%;&quot; width=&quot;60%&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 20.0%;&quot; width=&quot;20%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Software&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 8.0%;&quot; width=&quot;8%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 32.0%;&quot; width=&quot;32%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;member&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 8.0%;&quot; width=&quot;8%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 32.0%;&quot; width=&quot;32%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Book&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;6&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The correct
      solution, to cause the model to be in 4th normal form, is to ensure that
      all M:M relationships are resolved independently if they are indeed
      independent.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 1.0in; mso-border-bottom-alt: .25pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: outset; mso-border-top-alt: .25pt; mso-padding-alt: 0in 0in 0in 0in; width: 349.8pt;&quot; width=&quot;466&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 43.8pt;&quot; width=&quot;58&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Software&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 16.2pt;&quot; width=&quot;22&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 1.0in;&quot; width=&quot;96&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;membersoftware&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 16.8pt;&quot; width=&quot;22&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 44.4pt;&quot; width=&quot;59&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;member&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 27.0pt;&quot; width=&quot;36&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 54.6pt;&quot; width=&quot;73&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;memberBook&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-right: inset #111111 1.0pt; border: none; mso-border-left-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: inset #111111 .75pt; padding: 0in 0in 0in 0in; width: 24.6pt;&quot; width=&quot;33&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
  &lt;hr align=&quot;center&quot; size=&quot;2&quot; width=&quot;100%&quot; /&gt;
  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: #111111; mso-border-left-alt: .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-right-alt: .75pt; mso-border-style-alt: inset; mso-border-top-alt: .5pt; padding: 0in 0in 0in 0in; width: 44.4pt;&quot; width=&quot;59&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;book&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;7&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;5th
      Normal Form (5NF)(PJNF)&lt;br /&gt;
      &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table is in 5NF, also called
      &quot;Projection-Join Normal Form&quot;, if it is in 4NF and if every
      join dependency in the table is a consequence of the candidate keys of
      the table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo9; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Domain/key
      normal form (DKNF)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;. A key
      uniquely identifies each row in a table. A domain is the set of
      permissible values for an attribute. By enforcing key and domain
      restrictions, the database is assured of being freed from modification
      anomalies. DKNF is the normalization level that most designers aim to
      achieve. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Remember, these normalization
guidelines are cumulative.&amp;nbsp; For a database to be in 2NF, it must first
fulfill all the criteria of a 1NF database. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;121&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If a database is normalized by 3 NF then how many number of tables
     it should contain in minimum? How many minimum if 2NF and 1 NF?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is denormalization and when would you go for it?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;As the name indicates,
     denormalization is the reverse process of normalization. It&#39;s the controlled
     introduction of redundancy in to the database design. It helps &lt;u&gt;improve
     the query performance&lt;/u&gt; &lt;u&gt;as the number of joins could be reduced&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I randomly sort query results? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;To randomly order rows, or to
     return &lt;i&gt;x&lt;/i&gt; number of randomly chosen rows, you can use the RAND
     function inside the SELECT statement. But the RAND function is resolved
     only once for the entire query, so every row will get same value. You can
     use an ORDER BY clause to sort the rows by the result from the NEWID
     function, as the following code shows:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT *&lt;br /&gt;
     FROM Northwind..Orders &lt;br /&gt;
     ORDER BY NEWID()&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_who&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Provides information about
     current Microsoft® SQL Server™ users and processes. The information
     returned can be filtered to return only those processes that are not idle.
     &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Have you worked on Dynamic SQL? How will You handled “ (Double
     Quotes) in Dynamic SQL?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to find dependents of a table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Verify dependencies with &lt;b&gt;sp_depends&lt;/b&gt;
     before dropping an object &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between a CONSTRAINT AND RULE?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Rules are a
     backward-compatibility feature that perform some of the same functions as
     CHECK constraints. CHECK constraints are the preferred, standard way to
     restrict the values in a column. CHECK constraints are also more concise
     than rules; there can only be one rule applied to a column, but multiple
     CHECK constraints can be applied. CHECK constraints are specified as part
     of the CREATE TABLE statement, while rules are created as separate objects
     and then bound to the column. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to call a COM dll from SQL Server 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_OACreate - Creates an
     instance of the OLE object on an instance of Microsoft® SQL Server&lt;br /&gt;
     &lt;b&gt;Syntax&lt;br /&gt;
     sp_OACreate&lt;/b&gt; &lt;i&gt;progid&lt;/i&gt;&lt;b&gt;, &lt;/b&gt;| &lt;i&gt;clsid&lt;/i&gt;&lt;b&gt;, &lt;/b&gt;&lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;objecttoken&lt;/i&gt; &lt;b&gt;OUTPUT&lt;/b&gt; &lt;br /&gt;
     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ &lt;b&gt;,&lt;/b&gt; &lt;i&gt;context &lt;/i&gt;] &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;context - &lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies the execution context in which the newly
created OLE object runs. If specified, this value must be one of the following:&lt;b&gt;&lt;br /&gt;
1&lt;/b&gt; = In-process (.dll) OLE server only&lt;br /&gt;
&lt;b&gt;4&lt;/b&gt; = Local (.exe) OLE server only&lt;br /&gt;
&lt;b&gt;5&lt;/b&gt; = Both in-process and local OLE server allowed&lt;/span&gt;&lt;/div&gt;
&lt;h5 style=&quot;margin-left: .5in;&quot;&gt;
Examples&lt;/h5&gt;
&lt;h6 style=&quot;margin-left: .5in;&quot;&gt;
A. Use Prog ID - This example creates a SQL-DMO
SQLServer object by using its ProgID.&lt;/h6&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @object int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @hr int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @src varchar(255), @desc varchar(255)&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;EXEC @hr = sp_OACreate &#39;SQLDMO.SQLServer&#39;, @object OUT&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;IF @hr &amp;lt;&amp;gt; 0&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;BEGIN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT &lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;RETURN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;END&lt;/code&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;B. Use CLSID - This
example creates a SQL-DMO SQLServer object by using its CLSID.&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @object int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @hr int&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;DECLARE @src varchar(255), @desc varchar(255)&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;EXEC @hr = sp_OACreate &#39;{00026BA1-0000-0000-C000-000000000046}&#39;,&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;@object OUT&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;IF @hr &amp;lt;&amp;gt; 0&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;BEGIN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT &lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;RETURN&lt;/code&gt;&lt;/pre&gt;
&lt;pre style=&quot;margin-left: .5in;&quot;&gt;&lt;code&gt;END&lt;/code&gt;&lt;span style=&quot;mso-bidi-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;ol start=&quot;129&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Difference between sysusers and syslogins?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sysusers - Contains one row for
     each Microsoft® Windows user, Windows group, Microsoft SQL Server™ user,
     or SQL Server role in the database.&lt;br /&gt;
     syslogins - Contains one row for each login account. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the row size in SQL Server 2000?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;8060 bytes. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you find structure of table, all &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tables/views &lt;b&gt;in one db, all dbs?&lt;br /&gt;
     &lt;/b&gt;//structure of table&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb tbl_emp&lt;br /&gt;
     &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     //&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;list of all databases&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM master.dbo.sysdatabases&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;//details about database pubs. .mdf,
     .ldf file locations, size of database&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_helpdb pubs&lt;br /&gt;
     &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;//lists all tables under current
     database&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sp_tables&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM information_schema.tables WHERE
     (table_type = &#39;base table&#39;)&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;OR&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT * FROM sysobjects WHERE type = &#39;U&#39; //faster&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;B-tree indexes or doubly-linked lists?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the system function to get the current user&#39;s user id? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;USER_ID(). Also check out other
     system functions like USER_NAME(), SYSTEM_USER, SESSION_USER,
     CURRENT_USER, USER, SUSER_SID(), HOST_NAME(). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the series of steps that happen on execution of a query
     in a Query Analyzer?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;1) Syntax checking 2) Parsing 3)
     Execution plan &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Which event (Check constraints, Foreign Key, Rule, trigger,
     Primary key check) will be performed last for integrity check?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identity Insert Check&lt;br /&gt;
     Nullability constraint&lt;br /&gt;
     Data type check&lt;br /&gt;
     Instead of trigger&lt;br /&gt;
     Primary key&lt;br /&gt;
     Check constraint&lt;br /&gt;
     Foreign key&lt;br /&gt;
     DML Execution (update statements)&lt;br /&gt;
     After Trigger&lt;b&gt;&lt;br /&gt;
     &lt;/b&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will you show many to many relation in sql?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Create 3rd table with 2 columns
     which having one to many relation to these tables. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When a query is sent to the database and an index is not being
     used, what type of execution is taking place?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A table scan. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is #, ##, @, @@ means?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;@@ - System variables&lt;br /&gt;
     @ - user defined variables &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the difference between a Local temporary table and a
     Global temporary table? How is each one denoted?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Local temporary table will be
     accessible to only current user session, its name will be preceded with a
     single hash (#mytable)&lt;br /&gt;
     Global temporary table will be accessible to all users, &amp;amp; it will be
     dropped only after ending of all active connections, its name will be
     preceded with double hash (##mytable) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is covered queries in SQL Server?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is HASH JOIN, MERGE JOIN?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     &lt;b&gt;TOOLS&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in; mso-list: l0 level1 lfo4; tab-stops: list .5in; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;142.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Have you ever used DBCC command? Give an example for it.&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Transact-SQL programming language
provides DBCC statements that act as Database Console Commands for Microsoft®
SQL Serve 2000. These statements check the physical and logical consistency of
a database. Many DBCC statements can fix detected problems. Database Console
Command statements are grouped into these categories.&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: 471.0pt;&quot; width=&quot;628&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Statement category&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Perform&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Maintenance statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Maintenance tasks on a
  database, index, or filegroup. &lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Miscellaneous statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Miscellaneous tasks such as
  enabling row-level locking or removing a dynamic-link library (DLL) from
  memory.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Status statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Status checks.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 91.8pt;&quot; valign=&quot;top&quot; width=&quot;122&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Validation statements&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset #111111 1.0pt; border-left: none; border-right: inset #111111 1.0pt; border-top: none; mso-border-alt: inset #111111 .75pt; mso-border-left-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 372.6pt;&quot; valign=&quot;top&quot; width=&quot;497&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Validation operations on a
  database, table, index, catalog, filegroup, system tables, or allocation of
  database pages.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 6.45in;&quot; valign=&quot;top&quot; width=&quot;619&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;DBCC CHECKDB, DBCC
  CHECKTABLE, DBCC CHECKCATALOG, DBCC CHECKALLOC, DBCC SHOWCONTIG, DBCC
  SHRINKDATABASE, DBCC SHRINKFILE etc.&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;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol start=&quot;143&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the output of DBCC Showcontig statement?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Displays fragmentation
     information for the data and indexes of the specified table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do I reset the identity column?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use the DBCC CHECKIDENT
     statement, if you want to reset or reseed the identity column. For example,
     if you need to force the current identity value in the jobs table to a
     value of 100, you can use the following:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;USE pubs&lt;br /&gt;
     GO&lt;br /&gt;
     DBCC CHECKIDENT (jobs, RESEED, 100)&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;About SQL Command line executables&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset #111111 .75pt; mso-padding-alt: 1.2pt 1.2pt 1.2pt 1.2pt; width: .65in;&quot; width=&quot;62&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Utilities&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp&lt;br /&gt;
  console&lt;br /&gt;
  isql&lt;br /&gt;
  sqlagent&lt;br /&gt;
  sqldiag&lt;br /&gt;
  sqlmaint&lt;br /&gt;
  sqlservr&lt;br /&gt;
  vswitch&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;dtsrun&lt;br /&gt;
  dtswiz&lt;br /&gt;
  isqlw&lt;br /&gt;
  itwiz&lt;br /&gt;
  odbccmpt&lt;br /&gt;
  osql&lt;br /&gt;
  rebuildm&lt;br /&gt;
  sqlftwiz&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;distrib&lt;br /&gt;
  logread&lt;br /&gt;
  replmerg&lt;br /&gt;
  snapshot&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;scm&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset #111111 1.0pt; mso-border-alt: inset #111111 .75pt; mso-border-top-alt: inset #111111 .75pt; padding: 1.2pt 1.2pt 1.2pt 1.2pt; width: 40.8pt;&quot; valign=&quot;top&quot; width=&quot;54&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;regxmlss&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;146&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DTC?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The Microsoft Distributed
     Transaction Coordinator (MS DTC) is a transaction manager that allows
     client applications to include several different sources of data in one
     transaction. MS DTC coordinates committing the distributed transaction
     across all the servers enlisted in the transaction. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is DTS? Any drawbacks in using DTS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Microsoft® SQL Server™ 2000 Data
     Transformation Services (DTS) is a set of graphical tools and programmable
     objects that lets you extract, transform, and consolidate data from
     disparate sources into single or multiple destinations. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is BCP?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;bcp&lt;/b&gt; utility copies
     data between an instance of Microsoft® SQL Server™ 2000 and a data file in
     a user-specified format.&lt;br /&gt;
     C:\Documents and Settings\sthomas&amp;gt;bcp&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;usage: bcp {dbtable | query} {in | out | queryout |
     format} datafile&lt;br /&gt;
     [-m maxerrors] [-f formatfile] [-e errfile]&lt;br /&gt;
     [-F firstrow] [-L lastrow] [-b batchsize]&lt;br /&gt;
     [-n native type] [-c character type] [-w wide character type]&lt;br /&gt;
     [-N keep non-text native] [-V file format version] [-q quoted identifier]&lt;br /&gt;
     [-C code page specifier] [-t field terminator] [-r row terminator]&lt;br /&gt;
     [-i inputfile] [-o outfile] [-a packetsize]&lt;br /&gt;
     [-S server name] [-U username] [-P password]&lt;br /&gt;
     [-T trusted connection] [-v version] [-R regional enable]&lt;br /&gt;
     [-k keep null values] [-E keep identity values]&lt;br /&gt;
     [-h &quot;load hints&quot;]&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I create a plain-text flat file from SQL Server as input
     to another application?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;One of the purposes of
     Extensible Markup Language (XML) is to solve challenges like this, but
     until all applications become XML-enabled, consider using our faithful
     standby, the bulk copy program (bcp) utility. This utility can do more
     than just dump a table; bcp also can take its input from a view instead of
     from a table. After you specify a view as the input source, you can limit
     the output to a subset of columns or to a subset of rows by selecting
     appropriate filtering (WHERE and HAVING) clauses.&lt;br /&gt;
     More important, by using a view, you can export data from multiple joined
     tables. The only thing you cannot do is specify the sequence in which the
     rows are written to the flat file, because a view does not let you include
     an ORDER BY clause in it unless you also use the TOP keyword.&lt;br /&gt;
     If you want to generate the data in a particular sequence or if you cannot
     predict the content of the data you want to export, be aware that in
     addition to a view, bcp also supports using an actual query. The only
     &quot;gotcha&quot; about using a query instead of a table or view is that
     you must specify &lt;b&gt;queryout&lt;/b&gt; in place of &lt;b&gt;out&lt;/b&gt; in the bcp command
     line.&lt;br /&gt;
     For example, you can use bcp to generate from the &lt;b&gt;pubs&lt;/b&gt; database a
     list of authors who reside in California by writing the following code:&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;bcp &quot;SELECT * FROM pubs..authors WHERE state =
     &#39;CA&#39;&quot; queryout c:\CAauthors.txt -c -T -S&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the different ways of moving data/databases between
     servers and databases in SQL Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are lots of options
     available, you have to choose your option depending upon your
     requirements. Some of the options you have are: BACKUP/RESTORE, detaching
     and attaching databases, replication, DTS, BCP, logshipping,
     INSERT...SELECT, SELECT...INTO, creating INSERT scripts to generate data. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How will I export database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Through DTS - Import/Export
     wizard&lt;br /&gt;
     Backup - through Complete/Differential/Transaction Log &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to export database at a particular time, every week?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Backup - Schedule&lt;br /&gt;
     DTS - Schedule&lt;br /&gt;
     Jobs - create a new job &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you load large data to the SQL server database?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do you transfer data from text file to database (other than
     DTS)?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;bcp &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is OSQL and ISQL utility?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The &lt;b&gt;osql &lt;/b&gt;utility allows
     you to enter Transact-SQL statements, system procedures, and script files.
     This utility uses &lt;u&gt;ODBC&lt;/u&gt; to communicate with the server. &lt;br /&gt;
     The &lt;b&gt;isql&lt;/b&gt; utility allows you to enter Transact-SQL statements,
     system procedures, and script files; and uses &lt;u&gt;DB-Library&lt;/u&gt; to
     communicate with Microsoft® SQL Server™ 2000.&lt;br /&gt;
     All DB-Library applications, such as isql, work as SQL Server 6.5–level
     clients when connected to SQL Server 2000. They do not support some SQL
     Server 2000 features.&lt;br /&gt;
     The osql utility is based on ODBC and does support all SQL Server 2000
     features. Use osql to run scripts that isql cannot run. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What Tool you have used for checking Query Optimization? What is
     the use of profiler in sql server?&amp;nbsp; What is the first thing u look at
     in a SQL Profiler?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL Profiler is a graphical tool
     that allows system administrators to monitor events in an instance of
     Microsoft® SQL Server™. You can capture and save data about each event to
     a file or SQL Server table to analyze later. For example, you can monitor
     a production environment to see which stored procedures is hampering
     performance by executing too slowly. &lt;br /&gt;
     Use SQL Profiler to: &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Monitor the performance of an instance of SQL
      Server. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Debug Transact-SQL statements and stored
      procedures. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Identify slow-executing queries. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Test SQL statements and stored procedures in the
      development phase of a project by single-stepping through statements to
      confirm that the code works as expected. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo10; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Troubleshoot problems in SQL Server by capturing
      events on a production system and replaying them on a test system. This
      is useful for testing or debugging purposes and allows users to continue
      using the production system without interference. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Audit and review activity that
occurred on an instance of SQL Server. This allows a security administrator to
review any of the auditing events, including the success and failure of a login
attempt and the success and failure of permissions in accessing statements and
objects.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Permissions&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;157&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;If a user does not have permission on a table, but he has
     permission to a view created on it, will he be able to view the data in table?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Yes. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;After removing a table from database, what other related objects
     have to be dropped explicitly?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;(view, SP) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Different Authentication modes in Sql server? If a user is logged
     under windows authentication mode, how to find his userid?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;There are Three Different
     authentication modes in sqlserver. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;14&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SqlServer Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo11; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Mixed Authentication Mode &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;“system_user” system function
in sqlserver to fetch the logged on user name. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;160&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Give the connection strings from front-end for both type
     logins(windows,sqlserver)?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;This are specifically for
     sqlserver not for any other RDBMS&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Data Source=MySQLServer;Initial
     Catalog=NORTHWIND;Integrated Security=SSPI (windows)&lt;br /&gt;
     Data Source=MySQLServer;Initial Catalog=NORTHWIND;Uid=” ”;Pwd=” ”(sqlserver)&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are three SQL keywords used to change or set someone’s
     permissions?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Grant, Deny and Revoke&lt;b&gt;&lt;br /&gt;
     &lt;br /&gt;
     Administration&lt;/b&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Different types of Backups?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
     &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;circle&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;full database&lt;/u&gt; backup is a full copy of
      the database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;transaction log&lt;/u&gt; backup copies only the
      transaction log. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;u&gt;differential backup&lt;/u&gt; copies only the
      database pages modified after the last full database backup. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo12; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A file or filegroup restore allows the recovery
      of just the portion of a database that was on the failed disk. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;ol start=&quot;163&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are ‘jobs’ in SQL Server? How do we create one? What is
     tasks?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Using SQL Server Agent jobs, you
     can automate administrative tasks and run them on a recurring basis. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is database replication? What are the different types of
     replication you can set up in SQL Server? How are they used? What is
     snapshot replication how is it different from Transactional replication?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Replication is the process of copying/moving data between databases on the
     same or different servers. SQL Server supports the following types of
     replication scenarios: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Snapshot replication - It distributes data
      exactly as it appears at a specific moment in time and doesn’t monitor
      for updates. It can be used when data changes are infrequent. It is often
      used for browsing data such as price lists, online catalog, or data for
      decision support where the current data is not required and data is used
      as read only. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Transactional replication (with immediate
      updating subscribers, with queued updating subscribers) - With this an
      initial snapshot of data is applied, and whenever data modifications are
      made at the publisher, the individual transactions are captured and
      propagated to the subscribers. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Merge replication - It is the process of
      distributing the data between publisher and subscriber, it allows the
      publisher and subscriber to update the data while connected or
      disconnected, and then merging the updates between the sites when they
      are connected. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can u look at what are the process running on SQL server? How
     can you kill a process in SQL server?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Expand a server group, and then expand a server.
      &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Expand &lt;b&gt;Management&lt;/b&gt;, and then expand &lt;b&gt;Current
      Activity&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Click &lt;b&gt;Process Info&lt;/b&gt;. The current server
      activity is displayed in the details pane. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In the details pane,
right-click a Process ID, and then click &lt;b&gt;Kill Process&lt;/b&gt;. &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;166&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is RAID and what are different types of RAID configurations? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;RAID stands for Redundant Array
     of Inexpensive Disks, used to provide fault tolerance to database servers.
     There are six RAID levels 0 through 5 offering different levels of
     performance, fault tolerance. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Some of the tools/ways that help you troubleshooting performance problems
     are: SET SHOWPLAN_ALL ON, SET SHOWPLAN_TEXT ON, SET STATISTICS IO ON, SQL
     Server Profiler, Windows NT /2000 Performance monitor, Graphical execution
     plan in Query Analyzer. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How to determine the service pack currently installed on SQL
     Server? &lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The global variable &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;@@Version&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; stores
     the build number of the sqlservr.exe, which is used to determine the
     service pack installed.&lt;br /&gt;
     eg: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
     Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on
     Windows NT 5.0 (Build 2195: Service Pack 3) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the purpose of using COLLATE in a query?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     The term, collation, refers to a &lt;u&gt;set of rules that determine how data
     is sorted and compared&lt;/u&gt;. In Microsoft® SQL Server 2000, it is not
     required to separately specify code page and sort order for character
     data, and the collation used for Unicode data. Instead, specify the
     collation name and sorting rules to use. Character data is sorted using
     rules that define the correct character sequence, with options for
     specifying case-sensitivity, accent marks, kana character types, and
     character width. Microsoft SQL Server 2000 collations include these
     groupings: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows collations - Windows collations define
      rules for storing character data based on the rules defined for an
      associated Windows locale. The base Windows collation rules specify which
      alphabet or language is used when dictionary sorting is applied, as well
      as the code page used to store non-Unicode character data. For Windows
      collations, the &lt;b&gt;nchar&lt;/b&gt;, &lt;b&gt;nvarchar&lt;/b&gt;, and &lt;b&gt;ntext&lt;/b&gt; data
      types have the same sorting behavior as &lt;b&gt;char&lt;/b&gt;,&lt;b&gt; varchar&lt;/b&gt;, and &lt;b&gt;text&lt;/b&gt;
      data types &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;SQL collations - SQL collations are provided &lt;u&gt;for
      compatibility &lt;/u&gt;with sort orders in earlier versions of Microsoft SQL
      Server. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sort Order&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Binary is the fastest sorting order, and is case-sensitive. If &lt;b&gt;Binary&lt;/b&gt; is
selected, the &lt;b&gt;Case-sensitive&lt;/b&gt;, &lt;b&gt;Accent-sensitive&lt;/b&gt;, &lt;b&gt;Kana-sensitive&lt;/b&gt;,
and &lt;b&gt;Width-sensitive&lt;/b&gt; options are not available. &lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: outset black .75pt; mso-padding-alt: 0in 0in 0in 0in; width: 90.0%;&quot; width=&quot;90%&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset black 1.0pt; mso-border-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sort order&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-left: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Description&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Binary&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sorts and compares data in
  Microsoft® SQL Server™ tables based on the bit patterns defined for each
  character. Binary sort order is case-sensitive, that is lowercase precedes
  uppercase, and accent-sensitive. This is the fastest sorting order. &lt;br /&gt;
  If this option is not selected, SQL Server follows sorting and comparison
  rules as defined in dictionaries for the associated language or alphabet.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Case-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between uppercase and lowercase letters. &lt;br /&gt;
  If not selected, SQL Server considers the uppercase and lowercase versions of
  letters to be equal. SQL Server does not define whether lowercase letters
  sort lower or higher in relation to uppercase letters when Case-sensitive is
  not selected.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Accent-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between accented and unaccented characters. For example, &#39;a&#39; is
  not equal to &#39;á&#39;. &lt;br /&gt;
  If not selected, SQL Server considers the accented and unaccented versions of
  letters to be equal.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Kana-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between the two types of Japanese kana characters: Hiragana and
  Katakana. &lt;br /&gt;
  If not selected, SQL Server considers Hiragana and Katakana characters to be
  equal.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: inset black 1.0pt; mso-border-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 76.2pt;&quot; valign=&quot;top&quot; width=&quot;102&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Width-sensitive&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border-bottom: inset black 1.0pt; border-left: none; border-right: inset black 1.0pt; border-top: none; mso-border-alt: inset black .75pt; mso-border-left-alt: inset black .75pt; mso-border-top-alt: inset black .75pt; padding: 0in 0in 0in 0in; width: 85.0%;&quot; valign=&quot;top&quot; width=&quot;85%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Specifies that SQL Server
  distinguish between a single-byte character (half-width) and the same
  character when represented as a double-byte character (full-width). &lt;br /&gt;
  If not selected, SQL Server considers the single-byte and double-byte
  representation of the same character to be equal. &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;margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Windows collation options: &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;169&quot; type=&quot;1&quot;&gt;&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Latin1_General &lt;/b&gt;for the U.S. English
      character set (code page 1252). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Modern_Spanish&lt;/b&gt; for all variations of
      Spanish, which also use the same character set as U.S. English (code page
      1252). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Arabic&lt;/b&gt; for all variations of Arabic,
      which use the Arabic character set (code page 1256). &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Use &lt;b&gt;Japanese_Unicode&lt;/b&gt; for the Unicode
      version of Japanese (code page 932), which has a different sort order
      from &lt;b&gt;Japanese&lt;/b&gt;, but the same code page (932). &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the STUFF Function and how does it differ from the REPLACE
     function?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;STUFF - &lt;u&gt;Deletes a specified
     length of characters and inserts another set of characters&lt;/u&gt; at a
     specified starting point. &lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT STUFF(&#39;abcdef&#39;, 2, 3, &#39;ijklmn&#39;)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Here is the result set:&lt;br /&gt;
     &lt;/span&gt;&lt;code&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;--------- &lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;br /&gt;
     &lt;code&gt;aijklmnef&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;margin-left: .5in;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;REPLACE - Replaces &lt;u&gt;all
occurrences of the second given string expression in the first string expression
with a third expression&lt;/u&gt;.&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SELECT REPLACE(&#39;abcdefghicde&#39;,&#39;cde&#39;,&#39;xxx&#39;)&lt;br /&gt;
GO &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
Here is the result set: &lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;------------&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;abxxxfghixxx &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;171&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What does it mean to have quoted_identifier on? What are the
     implications of having it off?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;When SET QUOTED_IDENTIFIER is
     OFF (default), literal strings in expressions can be delimited by single
     or double quotation marks.&lt;br /&gt;
     When SET QUOTED_IDENTIFIER is ON, all strings delimited by double
     quotation marks are interpreted as object identifiers. Therefore, quoted
     identifiers do not have to follow the Transact-SQL rules for identifiers. &lt;br /&gt;
     SET QUOTED_IDENTIFIER must be ON when creating or manipulating indexes on
     computed columns or indexed views. If SET QUOTED_IDENTIFIER is OFF,
     CREATE, UPDATE, INSERT, and DELETE statements on tables with indexes on
     computed columns or indexed views will fail. &lt;br /&gt;
     The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server
     automatically set QUOTED_IDENTIFIER to ON when connecting.&lt;br /&gt;
     When a stored procedure is created, the SET QUOTED_IDENTIFIER and SET
     ANSI_NULLS settings are captured and used for subsequent invocations of
     that stored procedure. When executed inside a stored procedure, the
     setting of SET QUOTED_IDENTIFIER is not changed.&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SET QUOTED_IDENTIFIER OFF&lt;br /&gt;
     GO&lt;br /&gt;
     -- Attempt to create a table with a reserved keyword as a name&lt;br /&gt;
     -- should fail.&lt;br /&gt;
     CREATE TABLE &quot;select&quot; (&quot;identity&quot; int IDENTITY,
     &quot;order&quot; int)&lt;br /&gt;
     GO&lt;br /&gt;
     &lt;br /&gt;
     SET QUOTED_IDENTIFIER ON&lt;br /&gt;
     GO&lt;br /&gt;
     -- Will succeed.&lt;br /&gt;
     CREATE TABLE &quot;select&quot; (&quot;identity&quot; int IDENTITY,
     &quot;order&quot; int)&lt;br /&gt;
     GO&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the purpose of UPDATE STATISTICS?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Updates information about the
     distribution of key values for one or more statistics groups (collections)
     in the specified table or indexed view. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Fundamentals of Data warehousing &amp;amp; olap?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What do u mean by OLAP server? What is the difference between OLAP
     and OLTP?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is a tuple?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;A &lt;b&gt;tuple&lt;/b&gt; is an instance of
     data within a relational database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Services and user Accounts maintenance&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;sp_configure commands?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Displays or changes global
     configuration settings for the current server. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is the basic functions for master, msdb, tempdb databases?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
     Microsoft® SQL Server 2000 systems have four system databases: &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;master&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - The &lt;b&gt;master&lt;/b&gt; database records all of the &lt;u&gt;system level
      information&lt;/u&gt; for a SQL Server system. It &lt;u&gt;records all login accounts&lt;/u&gt;
      and all system configuration settings. &lt;b&gt;master&lt;/b&gt; is the database that
      &lt;u&gt;records the existence of all other databases, including the location&lt;/u&gt;
      of the database files. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;tempdb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - &lt;b&gt;tempdb&lt;/b&gt; &lt;u&gt;holds all temporary tables and temporary stored
      procedures&lt;/u&gt;. It also fills any other &lt;u&gt;temporary storage needs such
      as work tables&lt;/u&gt; generated by SQL Server. &lt;b&gt;tempdb&lt;/b&gt; is re-created
      every time SQL Server is started so the system starts with a clean copy
      of the database. &lt;br /&gt;
      By default, &lt;b&gt;tempdb&lt;/b&gt; autogrows as needed while SQL Server is
      running. If the size defined for &lt;b&gt;tempdb&lt;/b&gt; is small, part of your
      system processing load may be taken up with autogrowing &lt;b&gt;tempdb&lt;/b&gt; to
      the size needed to support your workload each time to restart SQL Server.
      You can avoid this overhead by using ALTER DATABASE to increase the size
      of &lt;b&gt;tempdb&lt;/b&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;model&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;
      - The &lt;b&gt;model&lt;/b&gt; database is used as the &lt;u&gt;template for all databases
      created on a system&lt;/u&gt;. When a CREATE DATABASE statement is issued, the
      first part of the database is created by copying in the contents of the &lt;b&gt;model&lt;/b&gt;
      database, then the remainder of the new database is filled with empty
      pages. Because &lt;b&gt;tempdb&lt;/b&gt; is created every time SQL Server is started,
      the &lt;b&gt;&lt;u&gt;model&lt;/u&gt;&lt;/b&gt;&lt;u&gt; database must always exist&lt;/u&gt; on a SQL Server
      system. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;msdb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; -
      The &lt;b&gt;msdb&lt;/b&gt; database is used by SQL Server Agent for &lt;u&gt;scheduling
      alerts and jobs, and recording operators&lt;/u&gt;. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are sequence diagrams? What you will get out of this sequence
     diagrams?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Sequence diagrams document the
     interactions between classes to achieve a result, such as a use case.
     Because UML is designed for object-oriented programming, these communications
     between classes are known as messages. The sequence diagram lists objects
     horizontally, and time vertically, and models these messages over time. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What are the new features of SQL 2000 than SQL 7? What are the new
     datatypes in sql?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;XML Support - The relational database engine can
      return data as Extensible Markup Language (XML) documents. Additionally,
      XML can also be used to insert, update, and delete values in the
      database. (for xml raw - to retrieve output as xml type) &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;User-Defined Functions - The programmability of
      Transact-SQL can be extended by creating your own Transact-SQL functions.
      A user-defined function can return either a scalar value or a table. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Indexed Views - Indexed views can significantly
      improve the performance of an application where queries frequently
      perform certain joins or aggregations. An indexed view allows indexes to
      be created on views, where the result set of the view is stored and
      indexed in the database. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;New Data Types&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - SQL Server 2000 introduces three new data types. &lt;b&gt;bigint&lt;/b&gt;
      is an 8-byte integer type. &lt;b&gt;sql_variant&lt;/b&gt; is a type that allows the
      storage of data values of different data types. &lt;b&gt;table&lt;/b&gt; is a type
      that allows applications to store results temporarily for later use. It
      is supported for variables, and as the return type for user-defined
      functions. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;INSTEAD OF and AFTER Triggers&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; - INSTEAD OF triggers are executed instead of
      the triggering action (for example, INSERT, UPDATE, DELETE). They can
      also be defined on views, in which case they greatly extend the types of
      updates a view can support. AFTER triggers fire after the triggering
      action. SQL Server 2000 introduces the ability to specify which AFTER
      triggers fire first and last. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Multiple Instances&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; of SQL Server - SQL Server 2000 supports
      running multiple instances of the relational database engine on the same
      computer. Each computer can run one instance of the relational database
      engine from SQL Server version 6.5 or 7.0, along with one or more
      instances of the database engine from SQL Server 2000. Each instance has
      its own set of system and user databases. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level2 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Index Enhancements - You can now create indexes
      on computed columns. You can specify whether indexes are built in
      ascending or descending order, and if the database engine should use
      parallel scanning and sorting during index creation. &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How do we open SQL Server in single user mode?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;We can accomplish this in any of
     the three ways given below :- &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol start=&quot;1&quot; type=&quot;1&quot;&gt;&lt;ol start=&quot;21&quot; type=&quot;a&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Command Prompt :-&lt;br /&gt;
      &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;sqlservr -m&lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Startup Options :-&lt;br /&gt;
      Go to SQL Server Properties by right-clicking on the Server name in the
      Enterprise manager. &lt;br /&gt;
      Under the &#39;General&#39; tab, click on &#39;Startup Parameters&#39;. &lt;br /&gt;
      Enter a value of -m in the Parameter. &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l4 level2 lfo13; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;&quot;&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;From Registry :-&lt;br /&gt;
      Go to
      HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\MSSQLServer\Parameters.
      &lt;br /&gt;
      Add new string value. &lt;br /&gt;
      Specify the &#39;Name&#39; as SQLArg(n) &amp;amp; &#39;Data&#39; as -m. &lt;br /&gt;
      Where n is the argument number in the list of arguments. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;ol start=&quot;182&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;What is Log Shipping?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;In Microsoft® SQL Server™ 2000
     Enterprise Edition, you can use log shipping to feed transaction logs from
     one database to another on a constant basis. Continually backing up the
     transaction logs from a source database and then copying and restoring the
     logs to a destination database keeps the destination database synchronized
     with the source database. This allows you to have a backup server and also
     provides a way to offload query processing from the main computer (the
     source server) to read-only destination servers. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;XML&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ol start=&quot;183&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;How can I convert data in a Microsoft Access table into XML
     format?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;The following applications can
     help you convert Access data into XML format: Access 2002, ADO 2.5, and
     SQLXML. Access 2002 (part of Microsoft Office&amp;nbsp;XP) enables you to
     query or save a table in XML format. You might be able to automate this
     process. ADO 2.5 and later enables you to open the data into a recordset,
     then persist the recordset in XML format, as the following code shows:&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;
     rs.Save &quot;c:\rs.xml&quot;, adPersistXML&lt;br /&gt;
     &lt;/span&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;You can use linked servers to add
     the Access database to your SQL Server 2000 database so you can run
     queries from within SQL Server to retrieve data. Then, through HTTP, you
     can use the SQLXML technology to extract the Access data in the XML format
     you want.&lt;b&gt;&lt;br /&gt;
     &lt;br /&gt;
     NEW&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo4; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;@@IDENTITY ?&lt;br /&gt;
     &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10.0pt;&quot;&gt;Ans: Returns the last-inserted
     identity value. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .25in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/230559220702912560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq-transact-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/230559220702912560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/230559220702912560'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/sql-server-faq-transact-sql.html' title=''/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-7569371947453993631</id><published>2012-08-04T12:04:00.004+05:30</published><updated>2012-08-04T13:12:42.490+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><category scheme="http://www.blogger.com/atom/ns#" term="Top 15 IT Certifications for 2012"/><title type='text'>State Management 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;br /&gt;Hi Everybody,&lt;br /&gt;&lt;br /&gt;I am once back with a blog/article/tutorial whatever you think/call it.&lt;br /&gt;&lt;br /&gt;State Management : &lt;br /&gt;&lt;br /&gt;HTTP
 Protocol is State less protocol. In Simple Language, Each and Every 
time We send a request to server, this is New to server. &lt;br /&gt;To Understand this ,Suppose you took One Textbox and Two Buttons like in Image below:&lt;br /&gt;&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Johnbhatt_5214_Untitled.jpg&quot; /&gt;&lt;br /&gt;Now,
 the task is To Enter Number in Textbox and Click in First Button to 
Convert to Integer format and then Click Second button to Print Square 
of Converted Integer in Textbox. What will you do. Lets look at code 
what I did here.&lt;br /&gt;
&lt;pre&gt;    protected void Page_Load(object sender, EventArgs e)
    {

    }
    int x;

    protected void Button1_Click(object sender, EventArgs e)
    {
        x = Convert.ToInt32(TextBox1.Text);
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        TextBox1.Text = Convert.ToString(x * x);
    }&lt;/pre&gt;
Now what would I get Result on Second Button Click event. Textbox Result will be 0 even I have entered any number. Don&#39;t agree, &lt;b&gt;try this at home&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;This
 is Because, at the time of Button2 Click new request is send to server 
and Initial Value of X is picked from server which is 0.&lt;br /&gt;&lt;br /&gt;To Prevent the Loose of Data each time we send request to server, ASP.NET have implemented concept of State Management. &lt;br /&gt;State Management is divided into 2 parts according to Functionality. &lt;br /&gt;1) User Based State Management&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dotnetfunda.com/blogs/Johnbhatt/2759/state-management-in-aspnet-part-1-cookies&quot;&gt;Cookies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;QueryStrings&lt;/li&gt;
&lt;li&gt;ViewState&lt;/li&gt;
&lt;li&gt;Controls&lt;/li&gt;
&lt;li&gt;Hidden Fields&lt;/li&gt;
&lt;/ul&gt;
2) Server Based State Management&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Session&lt;/li&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;Profile&lt;/li&gt;
&lt;/ul&gt;
I am going to Describe all these States step by step in Different Posts.&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-1.html&quot; target=&quot;_blank&quot;&gt;&lt;u&gt;&lt;b&gt;&amp;nbsp;State Management in ASP.NET (Part -1) : HttpCookies&lt;/b&gt;&lt;/u&gt; &lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Keep Reading &lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/7569371947453993631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7569371947453993631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/7569371947453993631'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet.html' title='State Management in ASP.NET'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8942547654388455253.post-2181805758101242885</id><published>2012-08-04T11:56:00.002+05:30</published><updated>2012-08-04T13:12:42.222+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview"/><title type='text'>State Management in ASP.NET part-2 (QueryString)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Hi,&lt;br /&gt;
&lt;div&gt;
Welcome to State Management in ASP.NET Series.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Today I am back with QueryString, another Client Based State Management concept.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Suppose,
 you are Creating a Website with Shopping Cart. In shopping page there 
are generally two or more forms. One for Product Selection (store) and 
another for Payment Gatebay (Cart/Checkout).&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Suppose you displayed your Product in Store using DataList or GridView or any method that you prefer. &lt;b&gt;Now how do you pass the Values from Store to Checkout Page&lt;/b&gt;? As We know HTTP is Stateless protocol so all your Variable values are lost during postback. &amp;nbsp;Lets be clear with below example.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Johnbhatt_6363_Shopping1.gif&quot; /&gt;&amp;nbsp;This
 is a example of Store. all products are listed here. To buy a check box
 is placed below every product. When you are done shopping, now for 
Payment options we have to move to Cart. So this page has a button named
 &lt;b&gt;Add to Cart&lt;/b&gt;. Now question is same, How do you get details of Checked (selected) products in Next Page as the data is coming from Database.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To solve this type of Problem, Microsoft has created concept of QueryString in ASP.NET. Look at below code which &lt;b&gt;Add to Cart button&lt;/b&gt; click event in ASPX.CS Page.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;pre&gt; &amp;nbsp; protected void BtnBuy_Click(object sender, EventArgs e)
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string PIDs = &quot;&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt;= DList1.Items.Count - 1; i++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CheckBox chkbuy = (CheckBox)DList1.Items[i].FindControl(&quot;ChkBuy&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (chkbuy.Checked)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Label lblPCode = (Label)DList1.Items[i].FindControl(&quot;PCode&quot;);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PIDs += lblPCode.Text + &quot;,&quot;;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PIDs = PIDs.Remove(PIDs.Length - 1);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Response.Redirect(&quot;CartView.aspx?PCode=&quot; + PIDs);
&amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/pre&gt;
&lt;div&gt;
Here I made a string of Product Key&#39;s and Passed that inside Response.Redirect by adding &lt;b&gt;?PCode=123,1233&lt;/b&gt; etc.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Which looks like in Below Example:&lt;/div&gt;
&lt;div&gt;
&lt;img src=&quot;http://www.dotnetfunda.com/UserFiles/BlogsFiles/Johnbhatt_7303_QueryStringinURL.gif&quot; /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here PIDs is a variable of string type which is Holding All Product Keys (Primary keys) of Selected Products.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now we are in New Page lets look what this will display and how we will get the Key. Source of Design.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;asp:GridView ID=&quot;GView1&quot; runat=&quot;server&quot; AllowPaging=&quot;true&quot; AllowSorting=&quot;true&quot; PageSize=&quot;3&quot;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AutoGenerateColumns=&quot;false&quot; OnRowDeleting=&quot;GView1_RowDeleting&quot;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OnRowEditing=&quot;GView1_RowEditing&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField HeaderText=&quot;Product Name&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Label runat=&quot;server&quot; ID=&quot;PName&quot; Text=&#39;&amp;lt;%#Eval(&quot;ProductName&quot;) %&amp;gt;&#39;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField HeaderText=&quot;Price&quot; ItemStyle-Width=&quot;100&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;big&amp;gt;&amp;lt;b&amp;gt;&amp;lt;asp:Label ID=&quot;PPrice&quot; 
runat=&quot;server&quot; Text=&#39;&amp;lt;%#Eval(&quot;ProductPrice&quot;) 
%&amp;gt;&#39;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;/big&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField HeaderText=&quot;Product Image&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:Image ID=&quot;PImage&quot; runat=&quot;server&quot; ImageUrl=&#39;&amp;lt;%#Eval(&quot;ProductImage&quot;)%&amp;gt;&#39; Width=&quot;150&quot;&lt;/div&gt;
&lt;div&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; Height=&quot;150&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EditItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:FileUpload ID=&quot;FName&quot; runat=&quot;server&quot; /&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/EditItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField HeaderText=&quot;Edit Details&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:LinkButton ID=&quot;LnkEdit&quot; runat=&quot;server&quot; CommandName=&quot;Edit&quot; Text=&quot;Edit&quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:TemplateField HeaderText=&quot;Remove Product&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;asp:LinkButton ID=&quot;LnkDelete&quot; runat=&quot;server&quot; 
CommandName=&quot;Delete&quot; Text=&quot;Remove from Cart&quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/asp:TemplateField&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Columns&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/asp:GridView&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
And now how will we get the Variable Stored in Shopping Page (PIDs) here, lets Clear with code.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&amp;nbsp;void BindDList()
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string PIDs = Request[&quot;PCode&quot;].ToString();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[&quot;MyShop&quot;].ConnectionString);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SqlDataAdapter adp = new SqlDataAdapter(&quot;Select * from Products where ProductID in (&quot; + PIDs + &quot;)&quot;, con);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSet ds = new DataSet();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; adp.Fill(ds);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GView1.DataSource = ds.Tables[0];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GView1.DataBind();
&amp;nbsp; &amp;nbsp; }
&lt;/pre&gt;
&lt;div&gt;
Here the method Request[QueryString] is used to get String and value which we passed as ?PCode= is Query string here.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can check at your machine and revert in case of any sort of errors.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy Coding.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://atozfreshersinterview.blogspot.com/feeds/2181805758101242885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2181805758101242885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8942547654388455253/posts/default/2181805758101242885'/><link rel='alternate' type='text/html' href='http://atozfreshersinterview.blogspot.com/2012/08/state-management-in-aspnet-part-2.html' title='State Management in ASP.NET part-2 (QueryString)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>