<?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-4026126075985170427</id><updated>2024-10-04T19:02:57.834-07:00</updated><category term="SQL SERVER COMMANDS"/><category term="SQL SERVER GENERAL QUESTIONS"/><category term="Stored Procedures"/><category term="Examples"/><category term="INTRODUCTION"/><category term="SQL SERVER FUNCTIONS"/><category term="Join in SQL Server"/><category term="SQL SERVER DML COMMANDS"/><category term="SQL SERVER Interview Questions"/><category term="Templates"/><category term="Miscellaneous"/><category term="SQL SERVER Error Messages"/><category term="SQL SERVER DDL COMMANDS"/><category term="sql server performance tuning tips"/><category term="SQL SERVER GENERAL SCENARIOS"/><category term="SQL SERVER Tutorial for the Beginners"/><category term="SQL Server Installation"/><category term="white papers"/><title type='text'>SQL SERVER Tips and Tricks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/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>148</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-8333363797660139575</id><published>2013-12-31T09:00:00.000-08:00</published><updated>2012-12-04T02:45:06.574-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Tutorial for the Beginners"/><title type='text'>SQL SERVER Tutorial for the Beginners</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;Chapter 1:&amp;nbsp; Introduction &lt;/b&gt;&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/introduction-to-database-management.html&quot; target=&quot;_blank&quot;&gt;Introduction to RDBMS&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/introduction-to-sql-server.html&quot; target=&quot;_blank&quot;&gt;Introduction to SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/sql-server-installation-steps.html&quot; target=&quot;_blank&quot;&gt;SQL Server Installation&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/getting-started-with-sql-server.html&quot; target=&quot;_blank&quot;&gt;Getting Started with SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/sql-server-system-databases.html&quot; target=&quot;_blank&quot;&gt;System Databases in SQL Server&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Chapter 2:&amp;nbsp; SQL Server Concepts&lt;/b&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; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/sql-commands-database-creation.html&quot; target=&quot;_blank&quot;&gt;Database Creation&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/data-types-in-sql-server_09.html&quot; target=&quot;_blank&quot;&gt;Data types in SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/sql-commands-create-table.html&quot; target=&quot;_blank&quot;&gt;Table Creation using SQL Commands&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/01/sql-create-table-part2.html&quot; target=&quot;_blank&quot;&gt;Table Creation using UI&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/03/sql-server-tables-part-3.html&quot; target=&quot;_blank&quot;&gt;Important points about Tables in SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/03/storing-and-retrieving-data-in-sql.html&quot; target=&quot;_blank&quot;&gt;Storing and Retrieving data in SQL Server&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Chapter 3:&amp;nbsp;Introduction to SQL Server Commands&lt;/b&gt;&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/command-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;Introduction to SQL Server Commands&lt;/a&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; &lt;b&gt;DDL Commands in SQL Server&lt;/b&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; 1.&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/ddl-commands-in-sql-server-create.html&quot; target=&quot;_blank&quot;&gt;CREATE&lt;/a&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;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/ddl-commands-in-sql-server-alter.html&quot; target=&quot;_blank&quot;&gt;ALTER&lt;/a&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; 3.&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/ddl-commands-in-sql-server-drop.html&quot; target=&quot;_blank&quot;&gt;DROP&lt;/a&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; 4.&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/ddl-commands-in-sql-server-truncate.html&quot; target=&quot;_blank&quot;&gt;TRUNCATE&lt;/a&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; &lt;b&gt;DML Commands in SQL Server&lt;/b&gt;&lt;br /&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. &amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-insert-part.html&quot; target=&quot;_blank&quot;&gt;INSERT&lt;/a&gt;&amp;nbsp; ( &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-insert-part.html&quot; target=&quot;_blank&quot;&gt;Part 1&lt;/a&gt;&amp;nbsp; , &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-insert-part.html&quot; target=&quot;_blank&quot;&gt;Part 2&lt;/a&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;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-update.html&quot; target=&quot;_blank&quot;&gt;UPDATE&lt;/a&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;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-select.html&quot; target=&quot;_blank&quot;&gt;SELECT &lt;/a&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;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dml-commands-in-sql-server-select.html&quot; target=&quot;_blank&quot;&gt;DELETE&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/dcl-commands-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;DCL Commands in SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/tcl-command-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;TCL Commands in SQL Server&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/whats-difference-between-delete-and.html&quot; target=&quot;_blank&quot;&gt;Difference Between DELETE and TRUNCATE &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;Chapter 4:&amp;nbsp;Simple Commands in SQL SERVER&lt;/b&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; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/select-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;SELECT&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/distinct-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;DISTINCT&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/top-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;TOP&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/where-clause-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;WHERE&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/group-by-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;GROUP BY&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/having-clause-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;HAVING&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/order-by-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;ORDER BY&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/where-clause-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;IN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/between-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;BETWEEN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/what-is-difference-between-having-and.html&quot; target=&quot;_blank&quot;&gt;Difference Between Having and Where&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/group-by-errors-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;Group By Errors&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;Chapter 5:&amp;nbsp;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/aggregate-functions-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;Aggregate&amp;nbsp;Functions in SQL SERVER&lt;/a&gt;&lt;/b&gt;&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/count-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;COUNT&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/sum-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;SUM&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/max-function-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;MAX&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/min-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;MIN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/avg-is-aggregate-function-which-is-used.html&quot; target=&quot;_blank&quot;&gt;AVG&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Chapter 6: &lt;a href=&quot;http://learnsqltips.blogspot.in/search/label/Join%20in%20SQL%20Server&quot; target=&quot;_blank&quot;&gt;Joins in SQL SERVER&lt;/a&gt;&lt;/b&gt;&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/inner-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;INNER JOIN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/left-outer-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;LEFT OUTER JOIN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/right-outer-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;RIGHT OUTER JOIN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/full-outer-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;FULL OUTER JOIN&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/cross-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;CROSS JOIN (or) CARTESIAN PRODUCT&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/04/self-join-in-sql-server.html&quot; target=&quot;_blank&quot;&gt;SELF JOIN&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Chapter 7: &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/stored-procedures-in-sql-server.html&quot;&gt;Stored Procedures in SQL SERVER&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/stored-procedures-in-sql-server.html&quot;&gt;Introduction to stored procedures&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/advantages-and-disadvantages-of-stored.html&quot;&gt;Advantages and Disadvantages of Stored Procedures&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/why-stored-procedures-are-faster-than.html&quot;&gt;Why stored procedures are faster than independent queries?&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/why-stored-procedures-are-preferred-in.html&quot;&gt;SP uses in Cross applications&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/stored-procedures-without-input-and.html&quot;&gt;SP without input and output parameters &lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/stored-procedures-with-input-parameters.html&quot;&gt;SP with input parameters and without output parameters&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/stored-procedures-with-input-and-output.html&quot;&gt;Stored procedures with input and output parameters&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/what-are-checks-performed-by-sql-server.html&quot;&gt;Checks performed&amp;nbsp;while compiling stored procedures&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/system-stored-procedures-in-sql-server.html&quot;&gt;System Stored Procedures&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Miscellaneous :&lt;/strong&gt;&lt;br /&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/search/label/Templates&quot;&gt;Templates for Creating Objects&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/temporary-tables.html&quot;&gt;Temporary Tables&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/functions-in-sql-server.html&quot;&gt;&lt;span id=&quot;goog_1397096015&quot;&gt;&lt;/span&gt;@@FUNCTIONS&lt;/a&gt;&lt;br /&gt;
&lt;span id=&quot;goog_1397096016&quot;&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/05/system-stored-procedures-in-sql-server.html&quot;&gt;System Stored Procedures&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/examples-in-sql-server.html&quot;&gt;Examples&lt;/a&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; &lt;a href=&quot;http://learnsqltips.blogspot.in/2012/11/white-papers-on-sql-server.html&quot;&gt;White Papers on SQL SERVER&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8333363797660139575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8333363797660139575'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/05/sql-server-tips-and-tricks.html' title='SQL SERVER Tutorial for the Beginners'/><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></entry><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-3491814682424709390</id><published>2013-12-11T21:43:00.000-08:00</published><updated>2013-12-11T21:43:00.880-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Interview Questions"/><title type='text'>Differences between ISNULL and NULLIF</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: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Hi friends, in this article I am gonna discuss the differences between ISNULL and NULLI.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Both ISNULL and NULLIF are built in system functions in sql server.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Lot of people get confused between these 2 system functions.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Lets discuss about each of these system functions separately so that you will get better idea.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Here is a video which clearly explains &amp;nbsp;&lt;a href=&quot;https://www.youtube.com/watch?v=waiKG7pPqHg&quot; target=&quot;_blank&quot;&gt;Differences between ISNULL and NULLIF&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;ISNULL:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;ISNUL is a system function which replaces NULL with the specified replacement value.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;The sytax for ISNULL function is&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;ISNULL (&amp;lt;check_expression&amp;gt; , &amp;lt;replacement_value&amp;gt; ).&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Which implies isnull function accepts 2 input parameters.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;1st one is an expression and 2nd paramter is a replacement value.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;The functionalityof ISNULL is :&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;1. 1st it will Evaluate the expression which is in parameter 1.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;2. it will compare the evaluated expression with null. if the paramter 1 = NULL ?&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;3. If parameter1 is equal to null i.e., if parameter 1 is null, then isnull function returns replacement value. if parameter1 &amp;lt;&amp;gt; NULL, then ISNULL function returns parameter1&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Lets see this with an example so that it will be more clear.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;CODE&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE @PARAM1 INT,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2 INT&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1 =10 ,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2= 20&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;SELECT ISNULL(&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2)&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;OUTPUT&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;10&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;In the above example Parameter1 IS NOT &amp;nbsp;NULL , so ISNULL Function returned&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Parameter1&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;CODE&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE @PARAM1 INT,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2 INT&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1 =NULL,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2= 20&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;SELECT ISNULL(&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2)&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;OUTPUT&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;0&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;In the above example Parameter1 IS NULL , so ISNULL Function returned&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Parameter2&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;To summarize is null functionality.&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; outline: none; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Parameter1 = NULL , retuns &amp;nbsp;Parameter2&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Parameter1 &amp;lt;&amp;gt; NULL , retuns &amp;nbsp;Parameter1&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;NULLIF:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;NULLIF is a system function which returns a null value if the two specified expressions are equal.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;The sytax for NULLIF function is&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #351c75; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;NULLIF ( &amp;lt;Expression1&amp;gt; , &amp;lt;Expression2&amp;gt; )&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Which implies NULLIF function also accepts 2 input parameters.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;The&amp;nbsp;functionality of&amp;nbsp;NULLIF is :&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;1. 1st it will Evaluate both the expression which are in parameter 1 and parameter 2.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;2. next it will compare both the evaluated expressions with null.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;3. If both the expressions are equal, the nullif functions returns NULL.&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;4. If both the expressions are not equal, the nullif functions returns 1st expression.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Lets see this with an example so that it will be more clear.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;CODE&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE @PARAM1 INT,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2 INT&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1 =10,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2= 20&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;SELECT NULLIF(&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2)&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;OUTPUT&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;10&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;In the above example Paramter1 is not equal to &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Paramter2&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;, so ISNULL Function returned&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Paramter1&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;CODE&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DECLARE @PARAM1 INT,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2 INT&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1 =10,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2= 10&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;SELECT NULLIF(&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM1&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;@PARAM2)&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;OUTPUT&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #20124d; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;NULL&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;In the above example Parameter1 is equal to &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Parameter2&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;, so ISNULL Function returned&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;NULL.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;To summarize nullif functionality...&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; outline: none; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Parameter1 = Parameter2 , retuns &amp;nbsp;NULL&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Parameter1 &amp;lt;&amp;gt; Parameter2 , retuns &amp;nbsp;Parameter1&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Lets conclude the discussion with the similarities and differences between ISNULL and NULLIF&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Similarities:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; outline: none; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Both ISNULL and NULLIF are system functions.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Syntax for Both the functions are similar&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Both &amp;nbsp;ISNULL and NULLIF functions accepts 2 input parameters.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;Differences:&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; outline: none; padding: 0px 0px 0px 2em;&quot;&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;isnull function compares 1st parameter with null.where as nullif function compares 1st parameter with 2nd parameter&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;ISNULL function returns 2nd paramter if the 1st parameter isnull. nullif function returns null is 1st parameter = 2nd paramter.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;ISNULL function returns 1st paramter if the 1st parameter is not null. nullif function returns 1st paramter if 1st parameter &amp;lt;&amp;gt; 2nd paramter.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;I hope this session is useful. Please me know your comments and valuable suggestion.&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;Bye , Have a good Day!!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Times New Roman&#39;, serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/3491814682424709390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2013/12/differences-between-isnull-and-nullif.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/3491814682424709390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/3491814682424709390'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2013/12/differences-between-isnull-and-nullif.html' title='Differences between ISNULL and NULLIF'/><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-6418251837684073578</id><published>2013-11-21T21:18:00.003-08:00</published><updated>2013-11-21T21:18:41.581-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER Interview Questions"/><title type='text'>Difference between primary key and unique key</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;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;Hi Friends, in this in this session we are going to learn
the differences between primary key and unique key.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;This is one of the most frequently asked sql server
interview questions. &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Before we discuss the difference between primary key and
unique key, let’s see what a primary key is and what a unique key is.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Primary Key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Primary key is a key which uniquely identifies each
row/record in the table.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;This implies if you have a primary key on a table, you can
identify each and every row in that table uniquely using primary key.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Unique Key:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Unique key constraint enforces the uniqueness on the columns
in which it is defined.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;That is Unique key will make sure only unique values are
allowed in the columns in which it is defined.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Similarities:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Both Primary key and unique Key enforces uniqueness on the
columns on which they are defined.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;Primary key and unique Key columns allow only
unique values.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;Primary key and unique Key columns will avoid
duplicates&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif; text-indent: -0.25in;&quot;&gt;Both Primary key and unique Key columns uniquely
identifies each row/record in the table&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--[if !supportLists]--&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Differences:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&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: 4.65pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 560px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: 15.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td style=&quot;background: #B8CCE4; border: solid windowtext 1.0pt; height: 15.0pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: windowtext; mso-border-left-alt: 1.0pt; mso-border-right-alt: .5pt; mso-border-style-alt: solid; mso-border-top-alt: 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 207.75pt;&quot; valign=&quot;bottom&quot; width=&quot;277&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;PRIMARY KEY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: #B8CCE4; border-left: none; border: solid windowtext 1.0pt; height: 15.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 212.25pt;&quot; valign=&quot;bottom&quot; width=&quot;283&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;UNIQUE KEY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15.0pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 15.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext 1.0pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 207.75pt;&quot; valign=&quot;bottom&quot; width=&quot;277&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Primary Key Does not allow duplicates &lt;o:p&gt;&lt;/o:p&gt;&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; height: 15.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 212.25pt;&quot; valign=&quot;bottom&quot; width=&quot;283&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;Unique key allows only one NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15.0pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 15.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext 1.0pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 207.75pt;&quot; valign=&quot;bottom&quot; width=&quot;277&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;A table can have only 1 Primary Key&lt;o:p&gt;&lt;/o:p&gt;&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; height: 15.0pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext 1.0pt; padding: 0in 5.4pt 0in 5.4pt; width: 212.25pt;&quot; valign=&quot;bottom&quot; width=&quot;283&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;A table can have multiple Unique Keys&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 30.75pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 30.75pt; mso-border-bottom-alt: solid windowtext 1.0pt; mso-border-left-alt: solid windowtext 1.0pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 207.75pt;&quot; valign=&quot;bottom&quot; width=&quot;277&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;By default Primary Key creates a Unique Clustered Index on the
  table&lt;o:p&gt;&lt;/o:p&gt;&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; height: 30.75pt; padding: 0in 5.4pt 0in 5.4pt; width: 212.25pt;&quot; valign=&quot;bottom&quot; width=&quot;283&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;By default Unique Key creates a Unique Non-Clustered Index on
  the table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;EXAMPLES:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATETABLE&lt;/span&gt; #CUSTOMER&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;ID&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;INT&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;span style=&quot;color: blue;&quot;&gt;PRIMARYKEY&lt;/span&gt;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&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; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;PHONE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INT&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;span style=&quot;color: blue;&quot;&gt;UNIQUE&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;SSN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INT&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;span style=&quot;color: blue;&quot;&gt;UNIQUE&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; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: grey;&quot;&gt;&lt;span style=&quot;font-family: Georgia, Times New Roman, serif;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: x-small;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/6418251837684073578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2013/11/difference-between-primary-key-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/6418251837684073578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/6418251837684073578'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2013/11/difference-between-primary-key-and.html' title='Difference between primary key and unique key'/><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-4026126075985170427.post-6201647084135513170</id><published>2013-02-05T05:36:00.003-08:00</published><updated>2013-02-05T05:36:28.872-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER GENERAL QUESTIONS"/><title type='text'>What is the short cut for opening sql server from command prompt?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Command for opening&amp;nbsp;Sql server management studio from run is:&lt;br /&gt;
&lt;br /&gt;
Go to Start --&amp;gt; Run --&amp;gt; Type&amp;nbsp;&quot; &lt;span style=&quot;color: blue;&quot;&gt;SQLWB&lt;/span&gt; &quot;&amp;nbsp;--&amp;gt; Click &quot;OK&quot;&lt;br /&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/AVvXsEhfTdntrI712tt75pnQ72LrZA4I_B_f8gE2Y1yZ4dnUbqCN86k3Arf340KCaB-PNlTPT__gXURG3W9L2OgLEIPTotqP9TdhGcjTGjcNuqs30P9_3JWLD222podo8DPlVz1-kmOzhi94NA/s1600/short+cut+for+opening+sql+server.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; jea=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfTdntrI712tt75pnQ72LrZA4I_B_f8gE2Y1yZ4dnUbqCN86k3Arf340KCaB-PNlTPT__gXURG3W9L2OgLEIPTotqP9TdhGcjTGjcNuqs30P9_3JWLD222podo8DPlVz1-kmOzhi94NA/s400/short+cut+for+opening+sql+server.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/6201647084135513170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2013/02/what-is-short-cut-for-opening-sql.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/6201647084135513170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/6201647084135513170'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2013/02/what-is-short-cut-for-opening-sql.html' title='What is the short cut for opening sql server from command prompt?'/><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/AVvXsEhfTdntrI712tt75pnQ72LrZA4I_B_f8gE2Y1yZ4dnUbqCN86k3Arf340KCaB-PNlTPT__gXURG3W9L2OgLEIPTotqP9TdhGcjTGjcNuqs30P9_3JWLD222podo8DPlVz1-kmOzhi94NA/s72-c/short+cut+for+opening+sql+server.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-2101682138539054693</id><published>2012-12-04T02:44:00.000-08:00</published><updated>2012-12-04T02:44:00.970-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER GENERAL QUESTIONS"/><title type='text'>How to delete duplicate records from a table in sql server?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There are lot of ways to delete duplicate records from table in sql server.&lt;br /&gt;
&lt;br /&gt;
Here in this article , I will tell you 2 methods through which you can delete duplicate records from the table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
1st create a sample table.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;STUDENT_ID&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FIRST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;LAST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FATHE_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ADDR&lt;span style=&quot;mso-tab-count: 3;&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; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;span style=&quot;color: grey;&quot;&gt;&lt;/span&gt;(&lt;/span&gt;400&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PHONE&lt;span style=&quot;mso-tab-count: 3;&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; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BIGINT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;inherit&#39;,&#39;serif&#39;; font-size: 9pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Tahoma; font-size: small;&quot;&gt;Insert data into&amp;nbsp;STUDENT table :&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;JOE&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;CAMERO&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;AARON&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;19 Quaker Ridge Rd.&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;6023458976&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;JOE&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;CAMERO&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;AARON&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;19 Quaker Ridge Rd.&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;6023458976&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;2&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Kathleen&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Kelly&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Devin&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;7100 Athens Place Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4083458976&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;2&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Kathleen&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Kelly&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Devin&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;7100 Athens Place Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4083458976&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;3&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Jeff&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Willams&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;8400 London Place Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4083128400&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;3&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Jeff&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Willams&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Jean&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;8400 London Place Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4083128400&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;4&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Dennis&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Charle&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Demarcus&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;1000 Coney Island Ave. Brooklyn NY 11230&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022151541&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;4&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Dennis&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Charle&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Demarcus&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;1000 Coney Island Ave. Brooklyn NY 11230&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022151541&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;5&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Adan&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Fred&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Abraham&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;5520 Quebec Place ; Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022151541&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;5&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Adan&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Fred&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Abraham&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;5520 Quebec Place ; Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022151541&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;6&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Omarion&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Balla&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Oliver&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3290 Hermosillo Place ;Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022178541&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;7&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Omari&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Richard&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Deshaun&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;1500 Vance Ave&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022178231&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;7&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Omari&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Richard&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Deshaun&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;1500 Vance Ave&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022178231&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;8&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Mill&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Mike&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Carol&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4150 Sydney Place ; Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022178231&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;9&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Joseph&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Fredric&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;George&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;915 E 7th St. Apt 6L;Brooklyn NY 11230&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3029875634&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;10&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Joaquin&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Norman&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Deonte&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;7100 Athens Place;Washington&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4158907654&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;11&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Denise&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Carter &#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Williams&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;6170 Peshwar Place&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4123567654&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;11&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Denise&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Carter &#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Williams&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;6170 Peshwar Place&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;4123567654&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Method 1: Delete duplicate records from a table using Temp Table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;By using the temporary table we can delete the duplicate records from the table. &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;1.&amp;nbsp; select distinct records from the main table into a temporary table.&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;2. Delete complete data from main table.&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;3. Insert the records from temp table into main table.&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;DISTINCT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; #TEMP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; STUDENT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; #TEMP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;u&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Method 2: Delete duplicate records from a table using CTE (Common Table Expression):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;CTE(Common Table Expression) can be used to delete the duplicate records from the table.&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;o:p&gt;Here is the sample query to delete duplicate records from STUDENT table:&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;WITH&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; STUDENT_CTE &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;ROW_NUMBER&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;()&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;OVER&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;PARTITION&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;BY&lt;/span&gt; STUDENT_ID &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ORDER&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;BY&lt;/span&gt; FIRST_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; LAST_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 3;&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;FATHE_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; ADDR&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;PHONE&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; ROW_NUM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT_CTE &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; ROW_NUM &lt;span style=&quot;color: grey;&quot;&gt;&amp;gt;&lt;/span&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/2101682138539054693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/12/how-to-delete-duplicate-records-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2101682138539054693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2101682138539054693'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/12/how-to-delete-duplicate-records-from.html' title='How to delete duplicate records from a table in sql server?'/><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-4026126075985170427.post-2852419181627016812</id><published>2012-11-27T04:39:00.002-08:00</published><updated>2013-03-13T02:16:58.581-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="white papers"/><title type='text'>White papers on sql server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is the link to my white papers on sql server:&lt;br /&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;http://www.docstoc.com/docs/148405708/White-Paper-on-Understanding-Query-Plan-in-SQL-Server&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; psa=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9mlOr6GlxFZLkgvsGA1nzi85uwrGqtB_ytt9XXrSEoWiaFXJ63qOYScYrI5spQQQFVCTpkGf5spNpODWUCbwzsnomv8EDD6gcK4Z4qDBBSm4CjJMFSv9lTYSutEDbTmtURkgop20Njg/s1600/1.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.docstoc.com/docs/148405708/White-Paper-on-Understanding-Query-Plan-in-SQL-Server&quot; target=&quot;_blank&quot;&gt;white paper on query plan in sql server&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/2852419181627016812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/11/white-papers-on-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2852419181627016812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2852419181627016812'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/11/white-papers-on-sql-server.html' title='White papers on sql server'/><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/AVvXsEj9mlOr6GlxFZLkgvsGA1nzi85uwrGqtB_ytt9XXrSEoWiaFXJ63qOYScYrI5spQQQFVCTpkGf5spNpODWUCbwzsnomv8EDD6gcK4Z4qDBBSm4CjJMFSv9lTYSutEDbTmtURkgop20Njg/s72-c/1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-1465949303729755402</id><published>2012-09-06T06:58:00.000-07:00</published><updated>2012-09-06T06:58:47.051-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER COMMANDS"/><title type='text'>NOCOUNT Command in sql server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;NOCOUNT command returns number of rows affected by T-SQL statements after the command execution.&lt;br /&gt;
&lt;br /&gt;
Syntax for NOCOUNT is :&lt;br /&gt;
&lt;br /&gt;
SET NOCOUNT {ON/OFF}&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;SET NOCOUNT OFF :&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; By default NOCOUNT option will be set to OFF in sql server. When ever a T-SQL statement is executed in sql server, then it will return the count of number of rows affected&amp;nbsp;after the statement completion.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;SET NOCOUNT ON :&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; This command will not return the count of the number of records affected after command execution.&lt;br /&gt;
&lt;br /&gt;
This option will reduce the extra overhead to the network , which will improve the performance of the sql code.&lt;br /&gt;
&lt;br /&gt;
SET NOCOUNT ON option is especially useful in case of stored procedures. &lt;br /&gt;
&lt;br /&gt;
If you still need to get the number of rows affected by the T-SQL statement that is executing you can still use the @@ROWCOUNT option.&amp;nbsp; By issuing a SET NOCOUNT ON this function @@ROWCOUNT still works and can still be used in stored procedures to fetch information about how many rows were affected by the statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/1465949303729755402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/nocount-command-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1465949303729755402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1465949303729755402'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/nocount-command-in-sql-server.html' title='NOCOUNT Command in sql server'/><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-4026126075985170427.post-8211606478490701241</id><published>2012-09-06T06:13:00.002-07:00</published><updated>2012-09-06T06:13:30.011-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER GENERAL QUESTIONS"/><title type='text'>What are the uses of SET NOCOUNT ON in sql server?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;By deafault NOCOUNT will be set to OFF in sql server. This will return number of&amp;nbsp; rows affected at the end of each T-SQL statement exceution. In a stored procedure which comprises of many T-SQL statements , its not wise to return the number of rows at the end of each statement execution. &lt;br /&gt;
&lt;br /&gt;
For printing the message with number of rows affected each time, sql server uses some part of system resources; Which is unneccesarily wasted for displaying unuseful informatio.&lt;br /&gt;
SET NOCOUNT ON eliminates the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure.&lt;br /&gt;
&lt;br /&gt;
For a stored procedures containing many T-SQL statements that do not return much actual data, SET NO COUNT ON can provide a significant performance boost because network traffic is greatly reduced.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/8211606478490701241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/what-are-uses-of-set-nocount-on-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8211606478490701241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8211606478490701241'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/what-are-uses-of-set-nocount-on-in-sql.html' title='What are the uses of SET NOCOUNT ON in sql server?'/><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-4026126075985170427.post-4396894252796944324</id><published>2012-09-06T06:12:00.000-07:00</published><updated>2012-09-06T06:12:36.703-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql server performance tuning tips"/><title type='text'>SQL Server Performance tuning tips : SET NOCOUNT ON at the top of stored procedure</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: blue;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;TIP: &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;Always SET NOCOUNT ON at the top of stored procedure for better performance.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By deafault NOCOUNT will be set to OFF in sql server. This will return number of&amp;nbsp; rows affected at the end of each T-SQL statement exceution. In a stored procedure which comprises of many T-SQL statements , its not wise to return the number of rows at the end of each statement execution. &lt;br /&gt;
&lt;br /&gt;
For printing the message with number of rows affected each time, sql server uses some part of system resources; Which is unneccesarily wasted for displaying unuseful informatio.&lt;br /&gt;
SET NOCOUNT ON eliminates the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure.&lt;br /&gt;
&lt;br /&gt;
For a stored procedures containing many T-SQL statements that do not return much actual data, SET NO COUNT ON can provide a significant performance boost because network traffic is greatly reduced.&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/4396894252796944324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/4396894252796944324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/4396894252796944324'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips-set.html' title='SQL Server Performance tuning tips : SET NOCOUNT ON at the top of stored procedure'/><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-4026126075985170427.post-4584057919835611048</id><published>2012-09-05T07:52:00.000-07:00</published><updated>2012-09-05T07:52:11.438-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL SERVER GENERAL QUESTIONS"/><title type='text'>What are the disadvantages of TRUNCATE in SQL Server?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;TRUNCATE command consumes less time compared to DELETE. Also, Truncate operation will not consume space in transaction log. &lt;br /&gt;
&lt;br /&gt;
Despite of these advantages, TRUNCATE will have its own disadvantages.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;TRUNCATE will reset the seed of an identity column to its initial value. If we don&#39;t want seed of identity column to reset after data deletion from table, then truncate is not an apt choice.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Statistics on table will not be updated automatically after TRUNCATE operation unless AUTO&amp;nbsp;UPDATE STATISTICS is&amp;nbsp;ON . So, After every TRUNCATE Statement it&#39;s required to update the statistics&amp;nbsp;on table manually. &amp;nbsp;If this operation is not done, then wrong statistics will up used for sometime, which may hit the performance.If you wait long enough, and if you have Auto Update Statistics turned on for the database, then the statistics will eventually catch up with themselves. But this may not happen quickly, resulting in slowly performing queries because the Query Optimiser is using out-of-date statistics.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/4584057919835611048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/what-are-disadvantages-of-truncate-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/4584057919835611048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/4584057919835611048'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/what-are-disadvantages-of-truncate-in.html' title='What are the disadvantages of TRUNCATE in SQL Server?'/><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-4026126075985170427.post-2076863583468141882</id><published>2012-09-05T07:00:00.001-07:00</published><updated>2012-09-05T07:00:32.916-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql server performance tuning tips"/><title type='text'>SQL Server Performance tuning Tips -- Use TRUNCATE Instead of DELETE</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: blue;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Tip: &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;AVOID &lt;strong&gt;DELETE &lt;/strong&gt;operation if the same task can be performed using &lt;strong&gt;TRUNCATE&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to delete complete data from a table, then go for TRUNCATE instead of DELETE.&lt;br /&gt;
&lt;br /&gt;
DELETE operation will maintain transaction log for each and every record it deletes from the table. This will unnecessarily consumes space in transaction log. &lt;br /&gt;
&lt;br /&gt;
Where as TRUNCATE operation will not maintain the log and it will delete all the records from table at one shot.&lt;br /&gt;
&lt;br /&gt;
Also, DELETE operation will consume significantly huge amount of time if the table is of big size.&lt;br /&gt;
&lt;br /&gt;
In order to have better performance and to run the query with in shorter time use &lt;strong&gt;TRUNCATE&lt;/strong&gt; instead of &lt;strong&gt;DELETE&lt;/strong&gt;.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/2076863583468141882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2076863583468141882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2076863583468141882'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips.html' title='SQL Server Performance tuning Tips -- Use TRUNCATE Instead of DELETE'/><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-4026126075985170427.post-1238217045390935869</id><published>2012-09-05T06:38:00.001-07:00</published><updated>2012-09-06T05:48:54.405-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql server performance tuning tips"/><title type='text'>Sql server performance tuning tips -- Don&#39;t Run Screen Saver</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: blue;&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;TIP:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt; Don&#39;t Run Screen Saver&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Running Screen saver in a machine consumes significant amount of CPU time. &lt;br /&gt;
If we are running the screen saver in the same machine as that of SQL Server running, then some part of CPU time is unnecessarily wasted for running screen saver.&lt;br /&gt;
&lt;br /&gt;
So, When ever a query is running&amp;nbsp;in sql server, always go for a blank screen saver instead of flashy and animated screen savers. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/1238217045390935869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips-dont.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1238217045390935869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1238217045390935869'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/09/sql-server-performance-tuning-tips-dont.html' title='Sql server performance tuning tips -- Don&#39;t Run Screen Saver'/><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-4026126075985170427.post-1532388747903141612</id><published>2012-08-14T04:11:00.001-07:00</published><updated>2012-08-14T04:16:54.764-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Miscellaneous"/><title type='text'>Temporary Tables</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;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;If we can create permanent (persistent) tables in database, why to go for temporary tables. Many people use temporary tables in database without knowing what the purpose and how it will add to performance tuning of queries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This article will brief you about various types of temporary tables and will show you the examples for each type of temporary table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&quot;Divide&#39;n&#39;Conquer&quot; a large &quot;problem&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;You can get absolutely mind boggling blinding speed out of some queries. This is the rule based on which temporary table concept came into picture. Many people think that &quot;good set based code&quot; has to be a single query to accomplish a task and nothing could be further from the truth. I&#39;ve used Temp Tables to divide up queries that have couple of joins and that previous took anywhere from 30 minutes to 1 hour to run and have gotten them to run in seconds.&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Temporary can be created at runtime and can do the all kinds of operations that one normal table can do. Scope of the temporary tables is limited to the session or instance. These tables are created in &lt;b&gt;tempdb&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Temporary tables are used in the following scenarios:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When we are doing large number of row manipulation in stored procedures. In complex joins, instead of joining the main table directly we can use temporary tables. This will reduce the data load on the table which in turn reduces the execution time of the query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l1 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This is useful to replace the cursor. We can store the result set data into a temp table, then we can manipulate the data from there. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Some important information about temp tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; 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: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Temporary table can&#39;t have foreign key constraints on it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; 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: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The best way to use a temporary table is to create it and then fill it with data. i.e., instead of using Select into temp table, create temp table 1&lt;sup&gt;st&lt;/sup&gt; and populate with data later&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l0 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Different Types of Temporary Tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In SQL SERVER we can create the following types of temporary tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Local Temp Table &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Global Temp Table &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Table Variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-list: l2 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;Local Temp Table:&lt;/span&gt; &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;Local temp &lt;span class=&quot;search-highlight1&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;tables&lt;/span&gt;&lt;/span&gt; are only available to the current connection for the user; and they are automatically deleted when the user disconnects from instances. Local &lt;span class=&quot;search-highlight1&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;temporary&lt;/span&gt;&lt;/span&gt; table name is&amp;nbsp;stared with hash &lt;/span&gt;&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;(&quot;#&quot;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;) sign&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Here is an example for local temp table.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&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/AVvXsEjamWVtwAmA5-SQB-j6WE0FJtqoYyZBoQAy5KxKQaeRibBk9HWQIWtOuPZ74wciZ5842VdU2rDMEwBqqwz978pypHbbyoBErnqwjE3mvfqXQJVSiwuX6Kp5LyE_XmMawOtno5bVwdfDHg/s1600/Local+Temp+Table.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjamWVtwAmA5-SQB-j6WE0FJtqoYyZBoQAy5KxKQaeRibBk9HWQIWtOuPZ74wciZ5842VdU2rDMEwBqqwz978pypHbbyoBErnqwjE3mvfqXQJVSiwuX6Kp5LyE_XmMawOtno5bVwdfDHg/s1600/Local+Temp+Table.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;v:shapetype coordsize=&quot;21600,21600&quot; filled=&quot;f&quot; id=&quot;_x0000_t75&quot; o:preferrelative=&quot;t&quot; o:spt=&quot;75&quot; path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; stroked=&quot;f&quot;&gt;&lt;v:stroke joinstyle=&quot;miter&quot;&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @0 1 0&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum 0 0 @1&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @2 1 2&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @0 0 1&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @6 1 2&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @8 21600 0&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;&gt;&lt;/v:f&gt;&lt;v:f eqn=&quot;sum @10 21600 0&quot;&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot; o:extrusionok=&quot;f&quot;&gt;&lt;/v:path&gt;&lt;o:lock aspectratio=&quot;t&quot; v:ext=&quot;edit&quot;&gt;&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;h3 style=&quot;background: white; margin: auto 0in;&quot;&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3 style=&quot;background: white; margin: auto 0in;&quot;&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3 style=&quot;background: white; margin: auto 0in;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/null&quot; name=&quot;heading0004&quot;&gt;&lt;span style=&quot;color: #004cd5;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Global Temp Table&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div style=&quot;background: white;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Global &lt;span class=&quot;search-highlight1&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Temporary&lt;/span&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;span class=&quot;search-highlight1&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;tables&lt;/span&gt;&lt;/span&gt; name starts with a double hash (&lt;code&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&quot;##&quot;&lt;/span&gt;&lt;/code&gt;). Once this table&amp;nbsp;has been created by a connection, like a permanent table it is then available to any user by any connection. It can only be deleted once all connections have been closed. &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Here is an example for global temp table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&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/AVvXsEie7WUSb4ncHIRDEQkKs_yTpdSxLMRW2f6WO_uFXwMfNpSDw8Y7MAQsOocV_4DhbeGFSRADj7LJ5yn0InRqVamsuAsXGkaX9kAv8w1O4Lijfwl5WClI2ACdraU4GsSCCncEQ0XUanJG6w/s1600/Global+Temp+Table.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie7WUSb4ncHIRDEQkKs_yTpdSxLMRW2f6WO_uFXwMfNpSDw8Y7MAQsOocV_4DhbeGFSRADj7LJ5yn0InRqVamsuAsXGkaX9kAv8w1O4Lijfwl5WClI2ACdraU4GsSCCncEQ0XUanJG6w/s1600/Global+Temp+Table.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;scope of Local Temporary table is only bounded with the current connection of current user.&lt;/span&gt; Where as, t&lt;span style=&quot;font-family: Verdana;&quot;&gt;he scope of Global temporary table is the same for the entire user for a particular connection. We need to put &quot;##&quot; with the name of Global temporary tables&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;We can create a table a global table in one instance of database and we can use it in another instance of the same database until we disconnect from database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;background: white; margin: auto 0in;&quot;&gt;&lt;span style=&quot;color: #004cd5;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Table Variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;We have a data type called TABLE in sql server. We can make use of this data type to create temporary tables in database. Here is the syntax for temporary table variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&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/AVvXsEhy_plmTUGhFsP65M9U6wR_vV_0jV3NxfvDpFbIHj2gQQHG6R8sWKcng679z_SGwpxHSYlEUUKcZIHP8IfYzD1Aq7eGOib04N98HArXdd5gLNrvpSi3X3BXcS3oDEXk9_6Uc2qzlCWhUQ/s1600/Table+Variable.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy_plmTUGhFsP65M9U6wR_vV_0jV3NxfvDpFbIHj2gQQHG6R8sWKcng679z_SGwpxHSYlEUUKcZIHP8IfYzD1Aq7eGOib04N98HArXdd5gLNrvpSi3X3BXcS3oDEXk9_6Uc2qzlCWhUQ/s1600/Table+Variable.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;If you have less than 100 rows generally use a table variable.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Otherwise use a temporary table.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;This is because SQL Server won&#39;t create statistics on table variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Temporary tables are stored in tempdb as shown below:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&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/AVvXsEizc36AHUxGVyda7thSxG0A2tYDLkwnnd-C8GOgL5-MyrG5cj6S_Qey6E5HjQdV31BV9iqDv3nNxenwx2lb3Fg1mfjjF2xY_ZZGOo_NN2XKmEL6VKBm1vj4G2scWfO6IQJDfiuv0dsq6A/s1600/Temp+Tables+in+Database.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizc36AHUxGVyda7thSxG0A2tYDLkwnnd-C8GOgL5-MyrG5cj6S_Qey6E5HjQdV31BV9iqDv3nNxenwx2lb3Fg1mfjjF2xY_ZZGOo_NN2XKmEL6VKBm1vj4G2scWfO6IQJDfiuv0dsq6A/s1600/Temp+Tables+in+Database.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin: 0in 0in 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/1532388747903141612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/temporary-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1532388747903141612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1532388747903141612'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/temporary-tables.html' title='Temporary Tables'/><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/AVvXsEjamWVtwAmA5-SQB-j6WE0FJtqoYyZBoQAy5KxKQaeRibBk9HWQIWtOuPZ74wciZ5842VdU2rDMEwBqqwz978pypHbbyoBErnqwjE3mvfqXQJVSiwuX6Kp5LyE_XmMawOtno5bVwdfDHg/s72-c/Local+Temp+Table.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4026126075985170427.post-7128865345214086871</id><published>2012-08-13T08:00:00.000-07:00</published><updated>2012-08-13T08:00:10.595-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Examples in SQL SERVER</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Examples and sample queries for various scenarios are provided below:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/database-creation-example.html&quot;&gt;Creating database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/drop-database-example.html&quot;&gt;Drop database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/create-database-example-by-defining.html&quot;&gt;Create database by defining size etc.,&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/use-clause-example.html&quot;&gt;USE Command Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/create-table-example.html&quot;&gt;Creating tables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/insert-data-examples.html&quot;&gt;Insert data into table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-inserting-data-into-table.html&quot;&gt;Insert data into table without providing column names&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-update-data-in-table.html&quot;&gt;Update data in a table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-deleting-data-from-table.html&quot;&gt;Deleting data from a table based on a condition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-deleting-complete-data-from.html&quot;&gt;Delete complete data from table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-truncate-table.html&quot;&gt;Truncate data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-creating-simple-stored.html&quot;&gt;Simple Stored procedure&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-creating-stored-procedure.html&quot;&gt;Stored procedure with an input parameter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/example-for-creating-stored-procedure_13.html&quot;&gt;Stored procedure with input and output parameters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/7128865345214086871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/examples-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/7128865345214086871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/7128865345214086871'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/examples-in-sql-server.html' title='Examples in SQL SERVER'/><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-4026126075985170427.post-3554083935840634930</id><published>2012-08-13T07:59:00.001-07:00</published><updated>2012-08-13T07:59:18.997-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Creating a stored procedure with input and output parameteres</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example 1: &lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Create a stored procedure to find out the class of a student based on the student id.&lt;br /&gt;
&lt;br /&gt;
Here, Student ID is an input parameter and Class ID is a output parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;PROC&lt;/span&gt; USP_CLASS_OF_STUD&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@STUDENT_ID&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;@CLASS_ID&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;OUTPUT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; @CLASS_ID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; CLASS_ID &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;FROM&lt;/span&gt; STUDENT_CLASS &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;WHERE&lt;/span&gt; STUDENT_ID &lt;span style=&quot;color: grey;&quot;&gt;&lt;a href=&quot;mailto:=@STUDENT_ID&quot;&gt;=&lt;/a&gt;&lt;/span&gt;@STUDENT_ID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;RETURN&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; @CLASS_ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;Example 2:&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Execute the above stored procedure to find of the class of a student whose id is 5&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;DECLARE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; @CLASS &lt;span style=&quot;color: blue;&quot;&gt;INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;EXEC&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; USP_CLASS_OF_STUD 5&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; @CLASS &lt;span style=&quot;color: blue;&quot;&gt;OUTPUT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; @CLASS&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/3554083935840634930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-stored-procedure_13.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/3554083935840634930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/3554083935840634930'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-stored-procedure_13.html' title='Example for Creating a stored procedure with input and output parameteres'/><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-4026126075985170427.post-422773504922172211</id><published>2012-08-13T06:10:00.000-07:00</published><updated>2012-08-13T06:10:43.686-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for creating a stored procedure with an input parameter</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example 1:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Create a stored procedure Student id, firstname and lastname from STUDENT table by joining the STUDENT_CLASS table Where class = @Class_Id_parameter&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;PROC&lt;/span&gt; USP_STUDENTS_IN_CLASS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;@CLASSS_ID&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;--Select the student deatils whose class id is @CLASSS_ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;S&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;STUDENT_ID&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;S&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;FIRST_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;S&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;LAST_NAME&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;S&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;INNER&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt; STUDENT_CLASS&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;SC&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;S&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;STUDENT_ID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;SC&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;STUDENT_ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;AND&lt;/span&gt; SC&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;CLASS_ID&lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; @CLASSS_ID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Example 2:&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; Execute the above stored procedure to fetch 10th class student&#39;s information/&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;o:p&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;o:p&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;EXEC USP_STUDENTS_IN_CLASS 10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/o:p&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/422773504922172211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-stored-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/422773504922172211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/422773504922172211'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-stored-procedure.html' title='Example for creating a stored procedure with an input parameter'/><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-4026126075985170427.post-8224695393784028267</id><published>2012-08-13T06:05:00.000-07:00</published><updated>2012-08-13T06:05:43.276-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for creating a simple stored procedure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Create a simple stored procedure to fetch complete data from STUDENT table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;PROC&lt;/span&gt; STUDENT_DATA&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;BEGIN&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;END&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/8224695393784028267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-simple-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8224695393784028267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8224695393784028267'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-creating-simple-stored.html' title='Example for creating a simple stored procedure'/><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-4026126075985170427.post-8871119125042089935</id><published>2012-08-13T06:02:00.000-07:00</published><updated>2012-08-13T06:02:42.562-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Inserting Data into a table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Insert data into STUDENT table without explicitly providing column names.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;Query:&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;VALUES&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;4&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Dennis&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Charle&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;Demarcus&#39;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;st1:address w:st=&quot;on&quot;&gt;&lt;st1:street w:st=&quot;on&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;1000 Coney Island Ave.&lt;/span&gt;&lt;/st1:street&gt;&lt;span style=&quot;color: red;&quot;&gt; &lt;st1:city w:st=&quot;on&quot;&gt;Brooklyn&lt;/st1:city&gt; &lt;st1:state w:st=&quot;on&quot;&gt;NY&lt;/st1:state&gt; &lt;st1:postalcode w:st=&quot;on&quot;&gt;11230&lt;/st1:postalcode&gt;&lt;/span&gt;&lt;/st1:address&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;3022151541&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/8871119125042089935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-inserting-data-into-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8871119125042089935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8871119125042089935'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-inserting-data-into-table.html' title='Example for Inserting Data into a 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-4026126075985170427.post-645009705714570680</id><published>2012-08-13T06:00:00.002-07:00</published><updated>2012-08-13T06:00:24.646-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Truncate table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example: &lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Truncate data from STUDENT table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;TRUNCATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; STUDENT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/645009705714570680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-truncate-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/645009705714570680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/645009705714570680'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-truncate-table.html' title='Example for Truncate 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-4026126075985170427.post-1639666708964209414</id><published>2012-08-13T05:59:00.002-07:00</published><updated>2012-08-13T05:59:30.629-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Deleting complete data from table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Delete complete information from STUDENT table.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/1639666708964209414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-deleting-complete-data-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1639666708964209414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1639666708964209414'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-deleting-complete-data-from.html' title='Example for Deleting complete data from 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-4026126075985170427.post-8392089118221505192</id><published>2012-08-13T05:05:00.002-07:00</published><updated>2012-08-13T05:05:13.572-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Deleting data from a table based on a condition </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example: &lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Delete data from STUDENT table where student id =1&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;DELETE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; STUDENT_ID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;1&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/8392089118221505192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-deleting-data-from-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8392089118221505192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8392089118221505192'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-deleting-data-from-table.html' title='Example for Deleting data from a table based on a condition '/><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-4026126075985170427.post-5482849407315993714</id><published>2012-08-13T05:03:00.000-07:00</published><updated>2012-08-13T05:03:30.475-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Example for Update data in a table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Example:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Update FIRST_NAME to &#39;JOE&#39; in STUDENT table for the student whose Id is 1 .&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;UPDATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;SET&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; FIRST_NAME &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;JOE&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;WHERE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; STUDENT_ID &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/5482849407315993714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-update-data-in-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/5482849407315993714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/5482849407315993714'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/example-for-update-data-in-table.html' title='Example for Update data in a 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-4026126075985170427.post-8928492181077250361</id><published>2012-08-13T05:01:00.000-07:00</published><updated>2012-08-13T05:01:16.497-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Insert data Examples</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Example:&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; Insert data into STUDENT table . &lt;br /&gt;
&lt;br /&gt;
Structure for Student table can be found in the below path: &lt;br /&gt;
&lt;a href=&quot;http://learnsqltips.blogspot.in/2012/08/create-table-example.html&quot;&gt;STUDNET Table &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;Query:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;INSERT&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;INTO&lt;/span&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;STUDENT_ID&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FIRST_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;LAST_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FATHE_NAME&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ADDR&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PHONE&lt;span style=&quot;mso-tab-count: 1;&quot;&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;VALUES&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;JAMES&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;CAMERO&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;AARON&#39;&lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;st1:street w:st=&quot;on&quot;&gt;&lt;st1:address w:st=&quot;on&quot;&gt;19 Quaker Ridge Rd.&lt;/st1:address&gt;&lt;/st1:street&gt;,&lt;st1:street w:st=&quot;on&quot;&gt;&lt;st1:address w:st=&quot;on&quot;&gt;Bethel CT&lt;/st1:address&gt;&lt;/st1:street&gt; 06801&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;6023458976&#39;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/8928492181077250361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/insert-data-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8928492181077250361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/8928492181077250361'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/insert-data-examples.html' title='Insert data Examples'/><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-4026126075985170427.post-2319751577920915274</id><published>2012-08-13T04:58:00.000-07:00</published><updated>2012-08-13T04:58:49.883-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>Create Table Example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Example:&lt;/span&gt;&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Create sample tables like Student, Class etc.,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;u&gt;Queries:&amp;nbsp; &lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&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;strong&gt;&lt;u&gt;&lt;em&gt;STUNDENT Table:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; STUDENT &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;STUDENT_ID&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FIRST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;LAST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FATHE_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ADDR&lt;span style=&quot;mso-tab-count: 3;&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;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;400&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PHONE&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BIGINT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&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;strong&gt;&lt;u&gt;&lt;em&gt;CLASS Table:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; CLASS &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CLASS_ID&lt;span style=&quot;mso-tab-count: 3;&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 style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CLASS_TEACH_ID&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&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;strong&gt;&lt;u&gt;&lt;em&gt;TEACHERTable:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; TEACHER&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;TEACHER_ID&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FIRST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;LAST_NAME&lt;span style=&quot;mso-tab-count: 2;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;25&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ADDR&lt;span style=&quot;mso-tab-count: 3;&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;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;400&lt;span style=&quot;color: grey;&quot;&gt;),&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;PHONE&lt;span style=&quot;mso-tab-count: 3;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;BIGINT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; font-size: 10pt; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&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;strong&gt;&lt;u&gt;&lt;em&gt;STUNDET_CLASS relation Table:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; STUDENT_CLASS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;STUDENT_ID&lt;span style=&quot;mso-tab-count: 3;&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;color: blue;&quot;&gt;INT&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;CLASS_ID&lt;span style=&quot;mso-tab-count: 3;&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 style=&quot;color: blue;&quot;&gt;INT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;&lt;span style=&quot;color: grey; font-family: &#39;Courier New&#39;; mso-bidi-font-family: Mangal; mso-bidi-language: HI; mso-no-proof: yes;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/2319751577920915274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/create-table-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2319751577920915274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/2319751577920915274'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/create-table-example.html' title='Create Table Example'/><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-4026126075985170427.post-1903091454925119938</id><published>2012-08-13T04:52:00.000-07:00</published><updated>2012-08-13T04:52:45.744-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Examples"/><title type='text'>USE Clause Example</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;strong&gt;&lt;em&gt;&lt;u&gt;Example:&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;Using &lt;strong&gt;&lt;em&gt;USE&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; clause in SQL Server , database can be changed to point to the required database instead of default database.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;Change the database from default database to EXAMPLE database&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;strong&gt;&lt;u&gt;&lt;em&gt;Query:&lt;/em&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;USE &lt;/span&gt;EXAMPLE&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;Before running the USE EXAMPLE command database was pointing to &#39;master&#39; database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img border=&quot;0&quot; height=&quot;244&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoKOTp3jWIA3aGWeI-Bmpht5RZDj45YT1H1gehCOsrCY36AB8vNhUkq1foxRX12H_HvM8Jbf0J8E54bzXSNgpQUg57WtaUS4eLDALxPVk8c9hBjmHciRRatEMtprf5L62cm6KFqYbryg/s320/After+Running+Use+Command.JPG&quot; width=&quot;320&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After running the USE EXAMPLE command database was pointing to EXAMPLE database.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoKOTp3jWIA3aGWeI-Bmpht5RZDj45YT1H1gehCOsrCY36AB8vNhUkq1foxRX12H_HvM8Jbf0J8E54bzXSNgpQUg57WtaUS4eLDALxPVk8c9hBjmHciRRatEMtprf5L62cm6KFqYbryg/s1600/After+Running+Use+Command.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoKOTp3jWIA3aGWeI-Bmpht5RZDj45YT1H1gehCOsrCY36AB8vNhUkq1foxRX12H_HvM8Jbf0J8E54bzXSNgpQUg57WtaUS4eLDALxPVk8c9hBjmHciRRatEMtprf5L62cm6KFqYbryg/s1600/After+Running+Use+Command.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSGT_f8lKqin8Rx44NjLWWQV3wfpHiMP5XUYZrObYRaMTD9j4KnlNmTqOaNatK3CRYTuPRd9WPNbAzpn2E3jQmGSrheTDZM9a7piVbXs0QJWiph9mTR7EFLEFFx6ogPqTZm0worWHVrQ/s1600/Before+Running+Use+Command.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; mda=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSGT_f8lKqin8Rx44NjLWWQV3wfpHiMP5XUYZrObYRaMTD9j4KnlNmTqOaNatK3CRYTuPRd9WPNbAzpn2E3jQmGSrheTDZM9a7piVbXs0QJWiph9mTR7EFLEFFx6ogPqTZm0worWHVrQ/s320/Before+Running+Use+Command.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img height=&quot;73&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoKOTp3jWIA3aGWeI-Bmpht5RZDj45YT1H1gehCOsrCY36AB8vNhUkq1foxRX12H_HvM8Jbf0J8E54bzXSNgpQUg57WtaUS4eLDALxPVk8c9hBjmHciRRatEMtprf5L62cm6KFqYbryg/s320/After+Running+Use+Command.JPG&quot; style=&quot;filter: alpha(opacity=30); left: 194px; mozopacity: 0.3; opacity: 0.3; position: absolute; top: 496px; visibility: hidden;&quot; width=&quot;96&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://learnsqltips.blogspot.com/feeds/1903091454925119938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/use-clause-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1903091454925119938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4026126075985170427/posts/default/1903091454925119938'/><link rel='alternate' type='text/html' href='http://learnsqltips.blogspot.com/2012/08/use-clause-example.html' title='USE Clause Example'/><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/AVvXsEjoKOTp3jWIA3aGWeI-Bmpht5RZDj45YT1H1gehCOsrCY36AB8vNhUkq1foxRX12H_HvM8Jbf0J8E54bzXSNgpQUg57WtaUS4eLDALxPVk8c9hBjmHciRRatEMtprf5L62cm6KFqYbryg/s72-c/After+Running+Use+Command.JPG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>