<?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-1774609031631111510</id><updated>2024-09-22T19:17:07.614-07:00</updated><category term="T-SQL"/><category term="Interview Questions"/><category term="SQL Server"/><category term="SQL Server Basics"/><category term="SQL Challenge"/><category term="Key Constraints"/><category term="UDF"/><category term="Function"/><category term="Stored Procedure"/><category term="LOCK"/><category term="Transactions"/><category term="Backup and Restore"/><category term="CHECK Constraints"/><category term="DEFAULT Constraints"/><category term="Date Puzzle"/><category term="HAVING"/><category term="JOINs"/><category term="Log Shipping"/><category term="SQL Clauses"/><category term="SQL Server 2012"/><category term="Security"/><category term="Table"/><category term="View"/><category term="WHERE"/><category term="query hint"/><title type='text'>SQL Server Guide</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3553817867653065240</id><published>2012-11-03T01:00:00.000-07:00</published><updated>2012-11-03T20:37:52.629-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Challenge"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>Learn T-SQL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/08/what-is-sql-sql-stands-for-s-tructured.html&quot;&gt;SQL Basics?&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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://sql-server-guide.blogspot.com/2012/10/sql-server-interview-questions-and.html&quot; target=&quot;_blank&quot;&gt;SQL Server Interview Questions And Answers&lt;/a&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/08/create-database.html&quot; target=&quot;_blank&quot;&gt;Create Database&lt;/a&gt;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/09/sql-server-tables.html&quot; target=&quot;_blank&quot;&gt;Table&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/09/what-is-view-in-sql-server-view-can-be.html&quot; target=&quot;_blank&quot;&gt;View&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/04/stored-procedure.html&quot; target=&quot;_blank&quot;&gt;Stored Procedure&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011_10_01_archive.html&quot; target=&quot;_blank&quot;&gt;Function&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Trigger&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
SQL
TOP&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
LIKE&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
Wildcards&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
IN&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
BETWEEN&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
Alias&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/05/explain-sql-server-joins-with-examples.html&quot; target=&quot;_blank&quot;&gt;SQL JOINs&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
UNION&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
UNION ALL&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL
SELECT INTO&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL CONSTRAINTS&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Data Definition Language
(DDL)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Data Manipulation Language
(DML)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL Server Data Types&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL NULLs&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL ISNULL&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL NULLIF&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SQL Date and Time Functions&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
T-SQL Control of Flow&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
CURSOR&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
T-SQL Operators&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
PRINT&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
RAISERROR&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Error Handling&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SET Statements&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Security Statements&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
BACKUP&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
RESTORE&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
TRANSACTIONS&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; dir=&quot;ltr&quot; style=&quot;margin: 0in 0in 10pt; text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/3553817867653065240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/10/learn-t-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3553817867653065240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3553817867653065240'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/10/learn-t-sql.html' title='Learn T-SQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-4274188804504993362</id><published>2012-10-20T05:00:00.000-07:00</published><updated>2012-11-03T21:35:10.805-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Challenge"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>SQL Server Interview Questions And Answers</title><content type='html'>&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/how-to-create-database-using-t-sql.html&quot;&gt;How to Create Database using T-SQL command?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/explain-candidate-key-alternate-key-and.html&quot;&gt;Explain Candidate Key, Alternate Key, and Composite Key&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/how-to-create-primary-key-on-existing.html&quot;&gt;How to create Primary Key on existing table?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/how-to-create-foreign-key-on-existing.html&quot;&gt;How to create Foreign Key on existing table?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/how-to-create-foreign-key-constraint-by.html&quot;&gt;How to create FOREIGN KEY constraint by using WITH NOCHECK &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/adding-default-constraint-to-existing.html&quot;&gt;How to add a DEFAULT constraint to an existing column?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/how-to-add-check-constraints-on.html&quot;&gt;How to add CHECK CONSTRAINTS on existing table?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/what-difference-between-primary-key-and.html&quot;&gt;What&#39;s the difference between a primary key and a unique key constraints?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/05/explain-sql-server-joins-with-examples.html&quot;&gt;Explain SQL Server JOINs with examples? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/what-is-difference-between-truncate-and.html&quot;&gt;What is the difference between TRUNCATE and DELETE?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/t-sql-query-to-calculate-month-end-date.html&quot;&gt;Write T-SQL query to calculate Month End Date&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/how-to-get-month-number-from-month-name.html&quot;&gt;How to get Month Number from Month Name &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/t-sql-query-to-find-nth-largest-number.html&quot;&gt;Write T-SQL Query to find Nth largest Number&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/06/maximum-capacity-specifications-for.html&quot;&gt;Maximum Capacity Specifications for Database Objects in SQL Server 2008 R2 &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/09/what-is-view-in-sql-server-view-can-be.html&quot;&gt;What is View in SQL Server?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/03/what-is-stored-procedure.html&quot;&gt;What is Stored Procedure?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/10/user-defined-functions-udf.html&quot;&gt;What is User Defined Functions (UDF)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/what-is-user-defined-function-udf-in.html&quot;&gt;What is User-Defined Function (UDF) in SQL Server?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/types-of-user-defined-functions-udf-in.html&quot;&gt;Types of User Defined Functions (UDF) in SQL Server?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/07/difference-between-function-and-stored.html&quot;&gt;Difference between Function and Stored Procedure? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/09/local-temporary-table-vs.html&quot;&gt;What is the difference between a local and a global temporary tables?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/what-is-nolock.html&quot;&gt;What is a NOLOCK?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/01/what-is-lock-escalation.html&quot;&gt;What is lock escalation? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/what-is-log-shipping-in-sql-server-2008.html&quot;&gt;What is Log Shipping in SQL Server? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/what-is-with-ties-clause-in-sql-server.html&quot;&gt;What is WITH TIES clause in SQL Server? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/count-number-of-records-for-all-tables.html&quot;&gt;COUNT Number of Records for all the Tables in a Database?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/function-to-split-multi-valued-string.html&quot;&gt;Function to Split Multi-valued String&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/08/how-to-connect-to-sql-server-using.html&quot;&gt;How to connect to SQL Server using RUNAS command from command prompt?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/08/regular-expression-problem-in-t-sql.html&quot;&gt;Regular Expression Problem in T-SQL&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/08/concatenating-row-values-using-transact.html&quot;&gt;Concatenating Row Values using Transact-SQL&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/11/which-tcpip-port-does-sql-server-run-on.html&quot;&gt;Which TCP/IP port does SQL Server run on? How can it be changed?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/11/what-is-uniqueidentifier-in-sql-server.html&quot;&gt;What is uniqueidentifier in SQL Server?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/12/what-is-newsequentialid.html&quot;&gt;What is NEWSEQUENTIALID?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/11/what-is-trace-flag-610.html&quot;&gt;What is Trace Flag 610?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/11/sleep-command-in-t-sql.html&quot;&gt;Sleep Command in T-SQL?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/12/what-is-use-updatestatistics-command.html&quot;&gt;What is the use UPDATE_STATISTICS command? &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/12/granting-execute-permission-on-all.html&quot;&gt;How to Granting Execute permission on All the Stored Procedure?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/01/how-to-get-sql-server-restore-history.html&quot;&gt;How to get SQL Server Restore history using T-SQL?&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/03/function-to-convert-decimal-number-into.html&quot;&gt;Function to Convert Decimal Number into Binary, Ternary, and Octal&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/03/how-to-find-all-identity-columns-in.html&quot;&gt;How to find all the IDENTITY columns in a database?&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/4274188804504993362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/10/sql-server-interview-questions-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/4274188804504993362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/4274188804504993362'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/10/sql-server-interview-questions-and.html' title='SQL Server Interview Questions And Answers'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5438909037665186294</id><published>2012-09-10T01:00:00.000-07:00</published><updated>2012-09-10T01:00:03.285-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HAVING"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="WHERE"/><title type='text'>Difference between a WHERE clause and HAVING clause?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul&gt;
&lt;li&gt;A&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; clause used to filter the physical rows in your table(s) whereas the &lt;span style=&quot;color: blue;&quot;&gt;HAVING&lt;/span&gt; clause operates on groups of a result-set (usually aggregate)&amp;nbsp;and&amp;nbsp;specifies which of the summary rows are returned in your resultset.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;A &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; clause is independent of &lt;span style=&quot;color: blue;&quot;&gt;GROUP BY&lt;/span&gt; clause but the &lt;span style=&quot;color: blue;&quot;&gt;HAVING&lt;/span&gt; clause does depend on this, although it can be used without this as well.&lt;/li&gt;
&lt;li&gt;&amp;nbsp;First SQL Server filters the physical rows using &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; conditions and then performs &lt;span style=&quot;color: blue;&quot;&gt;GROUP BY&lt;/span&gt;&amp;nbsp;on filtered data in memory and then filters the aggregated rows again with &lt;span style=&quot;color: blue;&quot;&gt;HAVING&lt;/span&gt; clause.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #660000;&quot;&gt;Example:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
List of all the employee with basic greater than 3000.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Z2EuBiMLFW1N746dK20wNHjByhznWunE59FYDXiR-u5kh24Pe5p2xVRYg5fndKZUpkI2A39Ryq0gJHtjOfPgMIy8_THGyZ7mobqfJSsK2NiiEbnOA90aeM0Iv2UQ5Kd8nJAEin3ztzmc/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; ox=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Z2EuBiMLFW1N746dK20wNHjByhznWunE59FYDXiR-u5kh24Pe5p2xVRYg5fndKZUpkI2A39Ryq0gJHtjOfPgMIy8_THGyZ7mobqfJSsK2NiiEbnOA90aeM0Iv2UQ5Kd8nJAEin3ztzmc/s320/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now I want to calculate the Dept codes for which total of basic is greater than 20,000 for those employees who are getting basic more than 3000.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTWuQJZGubHnyjaTzmuG3Je1Ntjdat91mMx71ozlDqVYuRzvj3sMkFsN1t8o-70nxixvDpK2TeDtfEZF8QRxMgUANdSFGlSE2NraCzgGU9A3U48Lw-_Fl3inN0GPoD0dB-duTlZR18tReH/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; ox=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTWuQJZGubHnyjaTzmuG3Je1Ntjdat91mMx71ozlDqVYuRzvj3sMkFsN1t8o-70nxixvDpK2TeDtfEZF8QRxMgUANdSFGlSE2NraCzgGU9A3U48Lw-_Fl3inN0GPoD0dB-duTlZR18tReH/s320/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5438909037665186294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/difference-between-where-clause-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5438909037665186294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5438909037665186294'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/difference-between-where-clause-and.html' title='Difference between a WHERE clause and HAVING clause?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Z2EuBiMLFW1N746dK20wNHjByhznWunE59FYDXiR-u5kh24Pe5p2xVRYg5fndKZUpkI2A39Ryq0gJHtjOfPgMIy8_THGyZ7mobqfJSsK2NiiEbnOA90aeM0Iv2UQ5Kd8nJAEin3ztzmc/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-4844957975428229819</id><published>2012-09-06T21:19:00.000-07:00</published><updated>2012-10-04T22:14:49.850-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Clauses"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>T-SQL Clauses</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Most commonly used T-SQL&amp;nbsp;command is SELECT statement. Below are the basic T-SQL clauses every SQL beginner must know:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Table_Name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Conditional_Statement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;HAVING&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Conditional_Statement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Lets take an example of &lt;strong&gt;Employee&lt;/strong&gt; table to understand these clauses:&lt;br /&gt;
&lt;br /&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: auto auto auto 4.65pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 619px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border: 1pt solid windowtext; height: 15pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;EmployeeID&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;FirstName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;MiddleName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;LastName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;DOB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Basic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11.05pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Department&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Hari&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;N&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sharma&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;10/10/1980&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;John&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Howell&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;11/11/1981&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1900&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Vijay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sharma&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;10/20/1982&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1500&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Engineering&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 4;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Paul&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Catlin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;7/25/1976&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2600&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Engineering&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 5;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Romil&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;F&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Driscoll&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1/13/1979&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2400&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 6;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Karthik&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;P&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Nagarajan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8/10/1969&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2800&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Engineering&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 7;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;7&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Hany&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;H&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Rodriguez&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4/10/1977&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2200&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Management&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 8;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;William&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Green&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1/21/1981&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1800&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Management&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 9;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;9&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Michelle&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;NULL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Jones&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5/19/1974&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2300&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Management&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 10; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65.8pt;&quot; valign=&quot;bottom&quot; width=&quot;88&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 63.35pt;&quot; valign=&quot;bottom&quot; width=&quot;84&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Thomas&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 73pt;&quot; valign=&quot;bottom&quot; width=&quot;97&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 64pt;&quot; valign=&quot;bottom&quot; width=&quot;85&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Lee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3/31/1984&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 45pt;&quot; valign=&quot;bottom&quot; width=&quot;60&quot;&gt;&lt;div align=&quot;right&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: right;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1600&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 88.1pt;&quot; valign=&quot;bottom&quot; width=&quot;117&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-char-indent-count: 1.0; text-indent: 11pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sales&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;strong&gt;SELECT&lt;/strong&gt; statement is used to pull the data from a table, view, or table valued function.&lt;br /&gt;
&lt;strong&gt;FROM &lt;/strong&gt;clause is used to specify the name of the source table which we pull the data from.&lt;br /&gt;
&lt;br /&gt;
For instance, we want to pull FirstName. LastName of all the employees along with Department name then we will use following query:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;FirstName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;LastName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Here is output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf2WIBq1KZGH1lUlzii8p9nIDh9Muez0OtsxmCY07PyJJQA0wkVk_6JMGt-v8xf1YDIcR8SFOa4d1sY5Bv0DuRxKKbYNR5JjC45-Dj-t3GBMw77_rFrlxjIboYPbmYqgtAHoBwsul-X94/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf2WIBq1KZGH1lUlzii8p9nIDh9Muez0OtsxmCY07PyJJQA0wkVk_6JMGt-v8xf1YDIcR8SFOa4d1sY5Bv0DuRxKKbYNR5JjC45-Dj-t3GBMw77_rFrlxjIboYPbmYqgtAHoBwsul-X94/s1600/select.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;WHERE &lt;/strong&gt;clause is used to filter the data coming from a table. For instance, you want to pull FirstName, MiddleName, LastName, and Basic of all employees who belong to &lt;strong&gt;Sales&lt;/strong&gt; department:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;FirstName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;MiddleName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;LastName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas;&quot;&gt;&#39;Sales&#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: red; font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;　&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Here is output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5x4mkZGSdTGulDXGJhWBefAjLKeK1XZ8tpaZRk8jdQ6xg1boOJbH2B9oB_lnOmAPWML7G4HIhpoihhfrN4hgmciJxSENZv58oLCfeX1kGkB0LP1BdZZ1_Yd1dTjrCS_kz2Squy_lRZ1E/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;GROUP BY&lt;/strong&gt; clause is used to aggregate the data based on certain group of columns. For instance, find out the TOTAL of basic amount for each department.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;BasicTotal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Here is output:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOvCbApZdCeSquaPAvThgiYLjzvT6xaqaU6bbZUMVXeZzoTkEga8CltH9p5mJ0BgBHsvSnsq0H8bTWNJfQvHSEHyKxYTUyOslOzEv-p9_ZbGnI3r64V485dSYil4RNeFGVqHa4lwAWbyM/s1600/select.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;/a&gt;&lt;strong&gt;HAVING &lt;/strong&gt;clause is used to filter out the data based on aggregated values. For instance, find out the list of Departments for which Total of basic is greater than 6500:&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;BasicTotal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Department&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;HAVING&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: magenta; font-family: Consolas;&quot;&gt;SUM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; 6500&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
I will explain the difference between WHERE and HAVING in my next post.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;ORDER BY &lt;/strong&gt;clause is used to arrange the result set in desired order, We can order the result in DESC or ASC order. For instance, get the list of all the employees in the order of First Name and then Last Name:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;FirstName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;MiddleName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;LastName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;FirstName,LastName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
You can also write this query in following way (1 means first column in SELECT statement and 2 means second column the SELECT statement):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;FirstName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;MiddleName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;LastName&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;Basic&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;dbo&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Employee&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;1,2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: teal; font-family: Consolas; font-size: x-small;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/4844957975428229819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/t-sql-clauses-most-commonly-used-t-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/4844957975428229819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/4844957975428229819'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/t-sql-clauses-most-commonly-used-t-sql.html' title='T-SQL Clauses'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf2WIBq1KZGH1lUlzii8p9nIDh9Muez0OtsxmCY07PyJJQA0wkVk_6JMGt-v8xf1YDIcR8SFOa4d1sY5Bv0DuRxKKbYNR5JjC45-Dj-t3GBMw77_rFrlxjIboYPbmYqgtAHoBwsul-X94/s72-c/select.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3683667462937005936</id><published>2012-09-05T16:56:00.000-07:00</published><updated>2012-10-04T16:59:49.761-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Table"/><title type='text'>SQL Server Tables</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;a href=&quot;http://sql-server-guide.blogspot.com/2012/08/how-to-create-table-using-t-sql-command.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;How to Create a Table using T-SQL&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/08/sql-server-table-name-limitations-t.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;SQL Server Table Name Limitations&lt;/span&gt;&lt;/a&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://sql-server-guide.blogspot.com/feeds/3683667462937005936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/sql-server-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3683667462937005936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3683667462937005936'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/sql-server-tables.html' title='SQL Server Tables'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-8311051158292507360</id><published>2012-09-04T00:00:00.000-07:00</published><updated>2012-10-04T22:15:21.825-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="View"/><title type='text'>What is View in SQL Server?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;A &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;view&lt;/b&gt; can be thought of as
either a virtual table or a stored query. The data accessible through a view is
not stored in the database as a distinct object. Only SELECT statement is stored in the database. The result set of the SELECT statement forms the virtual
table returned by the view. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Views are called virtual tables because the result
set of a view is us not usually saved in the database. The result set for a view
is dynamically incorporated into the logic of the statement and the result set
is built dynamically at run time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Views are created by defining the SELECT statement that retrieves the
data to be presented by the view. The data tables referenced by the SELECT
statement are known as the base tables for the view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Views can be created to hide data complexity as well data security.
For instance you have three tables, Employee, Department, and BasicPay and you
want to display only specific columns from these table.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&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: auto auto auto 4.65pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 679px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: 19.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border: 1pt solid windowtext; height: 19.5pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74pt;&quot; width=&quot;99&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Table / Entity&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 19.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 210.25pt;&quot; width=&quot;280&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Fields / Attributes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 19.5pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 225pt;&quot; width=&quot;300&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Comments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 20.25pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 20.25pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74pt;&quot; width=&quot;99&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Employee&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 20.25pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 210.25pt;&quot; width=&quot;280&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;(&lt;u&gt;EmployeeID&lt;/u&gt;, EmployeeName, DOB, DepartmentID)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 20.25pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 225pt;&quot; width=&quot;300&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;User can see all the attributes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 21pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 21pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74pt;&quot; width=&quot;99&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Department&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 21pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 210.25pt;&quot; width=&quot;280&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;(&lt;u&gt;DepartmentID&lt;/u&gt;, DepartmentName, ManagerEmployeeID)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 21pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 225pt;&quot; width=&quot;300&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;User can see all the attributes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 36.75pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74pt;&quot; width=&quot;99&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;BasicPay&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 36.75pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 210.25pt;&quot; width=&quot;280&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;(&lt;u&gt;EmployeeID, StartDate&lt;/u&gt;, EndDate, PayScale, BasicAmt,
  BonusAmt, SalaryCurreny)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 36.75pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 225pt;&quot; width=&quot;300&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;User can see only PayScale and should not have any access to
  BasicAmt and BonusAmout.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Suppose user is interested in following reporting data:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;FirstName&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;DeptManagerName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;PayScale&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Employee&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Department&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Employee&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;ManagerEmployeeID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;BasicPay&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Now you can create view a view to store the above query and grant
access to the view instead of granting access to all three tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: magenta;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;dbo.vwEmployeeDetails&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;IS&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;BEGIN&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;PRINT&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Dropping view
dbo.vwEmployeeDetails&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DROP&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;VIEW&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;vwEmployeeDetails&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;END&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Creating view
dbo.vwEmployeeDetails&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;VIEW&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;vwEmployeeDetails&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;AS&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;/***********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Created By&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;Author Name&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;Created Date&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;:&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;MM/DD/YYYY&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;History&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;-----------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;MM/DD/YYYY&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Comments&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;***********************************************/&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;FirstName&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;DeptManagerName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;PayScale&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Employee&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Department&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Employee&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;mgr&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;ManagerEmployeeID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LEFT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;JOIN&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;BasicPay&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ON&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeID&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Now you can pull the data directly from the view instead of using
complex query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;EmployeeName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DepartmentName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DeptManagerName&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;PayScale&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;FROM&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;vwEmployeeDetails&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Advantages
of View&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;There are several advantages of views as mentioned below:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;We can hide
data complexity in a view. Instead of forcing users to learn the T-SQL syntax,
you might wish to provide a view that runs a commonly requested SQL statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;View is an
ideal object to protect your data. If you have a table containing sensitive
data in certain columns, you might wish to hide those columns from certain
groups of users. For instance allow employees who do not work in payroll to see
the name, work phone, and department columns in an employee table, but do not
allow them to see any columns with salary information or personal information,
so you can create a view that only displays required columns. You can grant
permissions to that view without allowing users to query the underlying tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Join
columns from multiple tables so that they look like a single table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enforcing
some simple business rules. For example, if you wish to generate a list of
customers that need to receive the fall catalog, you can create a view of
customers that have previously bought your shirts during the fall. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Aggregate
information instead of supplying details. For example, present the sum of a
column, or the maximum or minimum value from a column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Data
exports with BCP. If you are using BCP to export your SQL Server data into text
files, you can format the data through views since BCP&#39;s formatting ability is
quite limited. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Customizing
data. If you wish to display some computed values or column names formatted
differently than the base table columns, you can do so by creating views.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-bidi-font-size: 12.0pt; mso-hansi-font-family: Calibri;&quot;&gt;Disadvantages
of View&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Even though
views can be a great tool for securing and customizing data, they can be performance
bottleneck. Indeed, they are not any faster than the query that defines them. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&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;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;Note&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;: From SQL
Server 2000 onwards, indexed views (also referred to as &quot;materialized&quot;
views) are supported to overcome this limitation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Views can
especially degrade the performance if they are based on other views. Therefore,
it is recommended NOT to create views based on other views.&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://sql-server-guide.blogspot.com/feeds/8311051158292507360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/what-is-view-in-sql-server-view-can-be.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8311051158292507360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8311051158292507360'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/what-is-view-in-sql-server-view-can-be.html' title='What is View in SQL Server?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-1949162443610246900</id><published>2012-09-01T14:00:00.000-07:00</published><updated>2012-10-04T22:15:40.974-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><title type='text'>Local temporary table VS Global temporary table</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;In
this post I will describe the differences between a Local temporary table and
global temporary table. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Below are the differences in tabular form:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;

&lt;br /&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: auto auto auto 4.65pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 637px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border: 1pt solid windowtext; height: 15pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Local Temporary Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td nowrap=&quot;&quot; style=&quot;background: rgb(31, 73, 125); border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Permanent Temporary Table&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;They have a single number sign (#) as the first character of
  their names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;They have a two number sign (##) as the first character of their
  names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 2;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;They are visible only to the current connection for the user,
  and they are deleted when the user disconnects from the instance of SQL
  Server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;They are visible to any user after they are created, and they
  are deleted when all users referencing the table disconnect from the instance
  of SQL Server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 60pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;If local temp table is created inside a stored procedure then it
  will get deleted once the execution is completed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 60pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;If global temp table is created inside a stored procedure then
  it will exists once the execution is completed. This will dropped
  automatically when the last user session that references the table
  disconnects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 4;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Multiple users can&#39;t share these tables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Multiple users can share these tables; in fact, all other
  database users can access it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;You can&#39;t grant or revoke permissions on these tables because it
  is available only to the owner.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;You can grant or revoke permissions on these tables because
  these are always available to everyone.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 120pt; mso-yfti-irow: 6; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 120pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 234.75pt;&quot; valign=&quot;bottom&quot; width=&quot;313&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;The local table we created in our procedure by using
  sp_executesql won&#39;t be accessible to either the procedure or its child
  procedures. Within its execution scope, an sp_executesql system stored procedure
  creates and drops a local table. By definition, when the sp_executesql
  procedure ends, the life of the table also ends—hence the need to create a
  global temporary table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 120pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 243pt;&quot; valign=&quot;bottom&quot; width=&quot;324&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;These tables will always available till the last user session
  that references the table disconnects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/1949162443610246900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/local-temporary-table-vs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/1949162443610246900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/1949162443610246900'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/09/local-temporary-table-vs.html' title='Local temporary table VS Global temporary table'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5089032787377659678</id><published>2012-08-24T15:15:00.000-07:00</published><updated>2012-10-04T22:16:06.236-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>Implementation of Database Object Schemas</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;A schema is a distinct namespace to facilitate the
separation, management, and ownership of database objects. It removed the tight
coupling of database objects and owners to improve the security administration
of database objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Schema can be considered as a container that can hold many
database objects. Database objects are created under a specific schema. If you
don’t define any schema while creating a table then object will be created under
default schema “dbo” which has database owner privilege.&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: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Example of schema: For a Sales database, we can create following
schemas:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;strong&gt;HR&lt;/strong&gt; – all the
human resource related tables can be created under this schema.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;strong&gt;Product&lt;/strong&gt; –
Product related tables an be create under this schema&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;strong&gt;Sales&lt;/strong&gt; –
Sales transactions tables can be created under this schema.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;Advantages
of using schemas:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Protecting database objects from being altered
by users without the knowledge of the database owner.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Preventing database base objects, independent
software vendor (ISV) databases in particular, from ad hoc or incorrect user
access leading to poor application performance&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Bringing related groups of objects (logical
entities) together within one physical database to reduce physical database
administrative overhead&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 10pt 0.5in;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;strong&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-theme-font: minor-bidi; mso-hansi-theme-font: minor-latin;&quot;&gt;Note&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&lt;strong&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-theme-font: minor-bidi; mso-hansi-theme-font: minor-latin;&quot;&gt;:&lt;/span&gt;&lt;/i&gt;&lt;/strong&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; A schema cannot be dropped if it contains
any objects. If a DROP SCHEMA statement is executed while it contains objects,
the drop operation fails.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Creating schema
using SQL Server Management Studio:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;In Object Explorer, expand the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Databases&lt;/strong&gt;&lt;/span&gt;
folder.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;Expand the database in which to create the new database schema.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;Right-click the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/span&gt; folder, point to
&lt;span class=&quot;label&quot;&gt;&lt;strong&gt;New&lt;/strong&gt;&lt;/span&gt;, and select &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Schema&lt;/strong&gt;&lt;/span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;In the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Schema - New&lt;/strong&gt;&lt;/span&gt; dialog box, on the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;General&lt;/strong&gt;&lt;/span&gt; page, enter a name for the new schema in the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Schema name&lt;/strong&gt;&lt;/span&gt; box.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;5.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;In the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Schema owner&lt;/strong&gt;&lt;/span&gt; box, enter the name
of a database user or role to own the schema. Alternately, click &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Search&lt;/strong&gt;&lt;/span&gt; to open the &lt;span class=&quot;label&quot;&gt;&lt;strong&gt;Search Roles and Users&lt;/strong&gt;&lt;/span&gt;
dialog box.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-left: 0.5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; mso-fareast-font-family: &amp;quot;Segoe UI&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;6.&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt;&quot;&gt;Click OK.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzu2vy6F2l2Li0TJHaZGh_IKiEdwdcJk0lNieMbIbPKrtRcl8JJKF3Ghl-qWelIGNnGb2mJ30e-C24wzf5bwGojV-jmYssIGeM0J87Wv-jWt-sWwkvWJ2tQW-2HcLt2amvrl8KgRSUzUU/s1600/Schema.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzu2vy6F2l2Li0TJHaZGh_IKiEdwdcJk0lNieMbIbPKrtRcl8JJKF3Ghl-qWelIGNnGb2mJ30e-C24wzf5bwGojV-jmYssIGeM0J87Wv-jWt-sWwkvWJ2tQW-2HcLt2amvrl8KgRSUzUU/s320/Schema.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzu2vy6F2l2Li0TJHaZGh_IKiEdwdcJk0lNieMbIbPKrtRcl8JJKF3Ghl-qWelIGNnGb2mJ30e-C24wzf5bwGojV-jmYssIGeM0J87Wv-jWt-sWwkvWJ2tQW-2HcLt2amvrl8KgRSUzUU/s1600/Schema.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzu2vy6F2l2Li0TJHaZGh_IKiEdwdcJk0lNieMbIbPKrtRcl8JJKF3Ghl-qWelIGNnGb2mJ30e-C24wzf5bwGojV-jmYssIGeM0J87Wv-jWt-sWwkvWJ2tQW-2HcLt2amvrl8KgRSUzUU/s1600/Schema.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Segoe UI&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9.5pt; line-height: 115%; mso-no-proof: yes;&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:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;&gt;
  &lt;v:f eqn=&quot;sum @0 0 1&quot;&gt;
  &lt;v:f eqn=&quot;prod @6 1 2&quot;&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;&gt;
  &lt;v:f eqn=&quot;sum @8 21600 0&quot;&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;&gt;
  &lt;v:f eqn=&quot;sum @10 21600 0&quot;&gt;
 &lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&gt;&lt;/v:f&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;o:lock aspectratio=&quot;t&quot; v:ext=&quot;edit&quot;&gt;
&lt;/o:lock&gt;&lt;/v:path&gt;&lt;/v:stroke&gt;&lt;/v:shapetype&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Creating
schema using T-SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[DatabaseName]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SCHEMA&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[SchemaName]&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AUTHORIZATION&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[OwnerName]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;color: black; font-family: Calibri; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[Test]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SCHEMA&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[HR]&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;AUTHORIZATION&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;[dbo]&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Times New Roman; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5089032787377659678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/implementationof-database-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5089032787377659678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5089032787377659678'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/implementationof-database-object.html' title='Implementation of Database Object Schemas'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzu2vy6F2l2Li0TJHaZGh_IKiEdwdcJk0lNieMbIbPKrtRcl8JJKF3Ghl-qWelIGNnGb2mJ30e-C24wzf5bwGojV-jmYssIGeM0J87Wv-jWt-sWwkvWJ2tQW-2HcLt2amvrl8KgRSUzUU/s72-c/Schema.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3976204922009790210</id><published>2012-08-21T09:00:00.000-07:00</published><updated>2012-10-04T22:16:35.794-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><title type='text'>System Databases in SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;mso-fareast-font-family: Arial;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;When you install
SQL Server, you will start with four system databases:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;master&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;model&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;msdb&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-add-space: auto; mso-list: l1 level1 lfo2; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;tempdb&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: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;All the
above databases are essential to run your server properly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 15pt; mso-bidi-font-size: 11.0pt;&quot;&gt;master&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 15pt; mso-bidi-font-size: 11.0pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;database&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Every SQL Server,
regardless of the version, has master database and hold special set of tables
called &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;system tables&lt;/b&gt;. These system
tables keeps track of the system as whole. For instance, when you create a new
database then an entry goes to &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-size: 9.5pt;&quot;&gt;sys.databases&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;or &lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10.5pt; mso-bidi-font-size: 9.5pt;&quot;&gt;sysdatabases&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 12pt; mso-bidi-font-size: 11.0pt;&quot;&gt; &lt;/span&gt;table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;SELECT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: grey;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;sysdatabases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;All the extended and system
stored procedures are stored in this database regardless of which database they
are intened to use with. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;Note: &lt;/i&gt;&lt;/b&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;everything that describes&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;your server is stored in master database so
this is very critical database nd hence can not be deleted.&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; 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;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 15pt; mso-bidi-font-size: 11.0pt;&quot;&gt;model &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;This is a database on
which a copy can be based. Model database forms a template for any new database
that we create.So you can modify &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;model&lt;/b&gt;
database if you want to change what standards, newly created database look
like. For instance, you can add some set of tables, functions anmd procedures that
need to be part of every newly created database. Also you can include some
users that would be cloned into every new database.&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;line-height: normal; 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;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt;Note:&lt;/i&gt;&lt;/b&gt;&lt;i style=&quot;mso-bidi-font-style: normal;&quot;&gt; this database serves as a template for any other database, it is a
required database and can not be deleted.&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 15pt; mso-bidi-font-size: 11.0pt;&quot;&gt;msdb &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&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;font-family: Calibri;&quot;&gt;MSDB
database stores all the tasks and processes related to &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;SQL Agent&lt;/b&gt;. For instance, if you schedule backups to run on a
databases nightly&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;then there will be an
enrty in msdb database.&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: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: 15pt; mso-bidi-font-size: 11.0pt;&quot;&gt;tempdb &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 13pt; mso-bidi-font-size: 11.0pt;&quot;&gt;database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;One of the
key workin area for the server is &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;tempdb&lt;/b&gt;.
SQl Server needs to create interm temporary tables to solve complex or large queries
and these interim tables are created in &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;tempdb&lt;/b&gt;.&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: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;tempdb is different
from any other database. Not only are the objects within it temporary, the
database itself is temporary. This is the only database in the system that is
completely rebuilt from scratch everytime you start your SQL server.&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://sql-server-guide.blogspot.com/feeds/3976204922009790210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/systemdatabases-in-sql-server-when-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3976204922009790210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3976204922009790210'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/systemdatabases-in-sql-server-when-you.html' title='System Databases in SQL Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3724537945096715221</id><published>2012-08-20T09:00:00.000-07:00</published><updated>2012-10-04T22:17:16.483-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><title type='text'>Column Data-types in SQL Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Tables
are database objects that contain all the data in a database. In tables, data
is logically organized in a row-and-column format similar to a spreadsheet.
Each row represents a unique record, and each &lt;strong&gt;column&lt;/strong&gt; represents a field in the
record. For example, a table that contains employee data for a company might
contain a row for each employee and columns representing employee information
such as employee number, name, address, job title, and home telephone number.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-US;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;In this post I will describe SQL Server data-types along with their size (in bytes) and the domain values that can be taken by the data types.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Following
data-types can be used for a &lt;strong&gt;column&lt;/strong&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&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: auto auto auto 4.65pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184; width: 617px;&quot;&gt;
 &lt;thead&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background: black; border: 1pt solid windowtext; height: 15pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Data
   type&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background: black; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Size [bytes]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background: black; border-color: windowtext windowtext windowtext rgb(0, 0, 0); border-style: solid solid solid none; border-width: 1pt 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 1;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Exact
   Numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 2;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;bit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;An
   integer data type that can take a value of 1, 0, or NULL. The string values
   TRUE and FALSE can be converted to bit values: TRUE is converted to 1 and
   FALSE is converted to 0. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 3;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;tinyint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Integer
   data type that can store 0 to 2^8-1 (255)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 4;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;smallint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Integer
   data type that can store -2^15 (-32,768) to 2^15-1 (32,767)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 5;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;int&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Integer
   data type that can store -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 6;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;bigint&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Integer
   data type that can store -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 7;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;decimal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5-17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Numeric
   data types that have fixed precision and scale.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 8;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;numeric&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5-17&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Numeric
   data types that have fixed precision and scale.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 9;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;smallmoney&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Currency
   that can store - 214,748.3648 to 214,748.3647&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 10;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;money&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Currency
   that can store -922,337,203,685,477.5808 to 922,337,203,685,477.5807&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 11;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Approxmate
   Numerics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 12;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;float&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4-8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Floating
   point data is approximate; therefore, not all values in the data type range
   can be represented exactly. Float cans store - 1.79E+308 to -2.23E-308, 0
   and 2.23E-308 to 1.79E+308&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 13;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;real&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Real
   can store - 3.40E + 38 to -1.18E - 38, 0 and 1.18E - 38 to 3.40E + 38.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 14;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Date
   and Time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 15;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;stores
   DATE in &#39;YYYY-MM-DD&#39;. Range 0001-01-01 through 9999-12-31&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 16;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;smalldatetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;stores
   DATETIME like &#39;YYYY-MM-DD hh:mm:ss&#39;. Date range 1900-01-01 00:00:00 through
   2079-06-06 23:59:59&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 17;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;datetime&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;stores
   DATETIME like &#39;YYYY-MM-DD hh:mm:ss&#39;. Date range 1753-01-01 00:00:00 through
   9999-12-31 23:59:59&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 18;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Stores
   only time like &#39;hh:mm:ss.nnnnnnn&#39;. Range 00:00:00.0000000 through
   23:59:59.9999999&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 19;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Character
   Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 20;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;char&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;CHAR(n).
   Fixed-length, non-Unicode string data. n defines the string length and must
   be a value from 1 through 8000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 21;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;varchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;VARCHAR(n
   | max). Variable-length, non-Unicode string data. n defines the string
   length and can be a value from 1 through 8000. max indicates that the
   maximum storage size is 2^31-1 bytes (2 GB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 22;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;text&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Variable-length
   non-Unicode data in the code page of the server and with a maximum string
   length of 2^31-1 (2,147,483,647). Storage size, in bytes is the string
   length entered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 23;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Unicode
   Character Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 24;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;nchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;CHAR(n).
   Fixed-length, Unicode string data. n defines the string length and must be a
   value from 1 through 4000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 45pt; mso-yfti-irow: 25;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;nvarchar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;2n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 45pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;VARCHAR(n
   | max). Variable-length, Unicode string data. n defines the string length
   and can be a value from 1 through 4000. max indicates that the maximum
   storage size is 2^31-1 bytes (2 GB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 26;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;ntext&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Variable-length
   Unicode data with a maximum string length of 2^30 - 1 (1,073,741,823).
   Storage size, in bytes, is two times the string length entered&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 27;&quot;&gt;
   &lt;td colspan=&quot;3&quot; nowrap=&quot;&quot; style=&quot;background: rgb(217, 217, 217); border-color: rgb(0, 0, 0) black windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-alt: solid windowtext .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 463pt;&quot; valign=&quot;bottom&quot; width=&quot;617&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Unicode
   Character Strings&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 30pt; mso-yfti-irow: 28;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;binary&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Fixed-length
   binary data with a length of n bytes, where n is a value from 1 through 8000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 29; mso-yfti-lastrow: yes;&quot;&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext; border-style: none solid solid; border-width: 0px 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.9pt;&quot; valign=&quot;bottom&quot; width=&quot;100&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;image&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td nowrap=&quot;&quot; style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 74.35pt;&quot; valign=&quot;bottom&quot; width=&quot;99&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
   &lt;td style=&quot;background-color: transparent; border-color: rgb(0, 0, 0) windowtext windowtext rgb(0, 0, 0); border-style: none solid solid none; border-width: 0px 1pt 1pt 0px; height: 15pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt; padding: 0in 5.4pt; width: 313.75pt;&quot; valign=&quot;bottom&quot; width=&quot;418&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Variable-length
   binary data from 0 through 2^31-1 (2,147,483,647) bytes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;/tr&gt;
&lt;/thead&gt;
&lt;/table&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;br /&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://sql-server-guide.blogspot.com/feeds/3724537945096715221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/column-data-types-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3724537945096715221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3724537945096715221'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/column-data-types-in-sql-server.html' title='Column Data-types in SQL Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-311627711030239651</id><published>2012-08-17T19:37:00.000-07:00</published><updated>2012-10-04T22:13:08.157-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>How to CREATE a table using T-SQL command</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;Tables
are database objects that contain all the data in a database. In tables, data
is logically organized in a row-and-column format similar to a spreadsheet.
Each row represents a unique record, and each column represents a field in the
record. For example, a table that contains employee data for a company might
contain a row for each employee and columns representing employee information
such as employee number, name, address, job title, and home telephone number.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;strong&gt;Tables&lt;/strong&gt; can be created through &lt;strong&gt;SQL Server Management Studio&lt;/strong&gt; and &lt;strong&gt;T-SQL&lt;/strong&gt; command.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 11.5pt; mso-bidi-font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 11.5pt; mso-bidi-font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;span style=&quot;font-family: inherit; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin;&quot;&gt;command is used to create a table in the database. For instance, following command can be used to create MyTable:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: sans-serif; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&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;30&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DoB&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;date&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;gender&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&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&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;If you execute the above command twice, you will get following error:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: sans-serif;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9pt;&quot;&gt;Msg 2714, Level 16, State 6, Line 1&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: red; font-family: Consolas; font-size: 9pt;&quot;&gt;There is already an object named
&#39;MyTable&#39; in the database.&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;You need to check the object&#39;s existence before creating it to avoid above error as shown below:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;dbo.MyTable&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;IS&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;NULL&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;DROP&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&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;30&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DoB&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;date&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;gender&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&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&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-size: 12pt; line-height: 115%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;You will see following message after
executing above query:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;&lt;span style=&quot;font-family: Times New Roman; font-size: small;&quot;&gt;

&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;Command(s) completed successfully.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Times New Roman;&quot;&gt;

&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Note&lt;/span&gt;&lt;/strong&gt;: This is always a good idea to add some logging information while creating and dropping any object or executing any T-SQL code for that matter. Logging always helps in troubleshooting.&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;IF&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: magenta;&quot;&gt;OBJECT_ID&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;dbo.MyTable&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;IS&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NULL&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;DROP&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;BEGIN&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;PRINT&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Dropping table dbo.MyTable...&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;DROP&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;END&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;PRINT&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Creating table dbo.MyTable...&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;dbo.MyTable&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;ID&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&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;30&lt;span style=&quot;color: grey;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;DoB&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;date&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;gender&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&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&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;line-height: 115%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Now you will see following messages
after executing above code:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;Dropping table MyTable...&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: rgb(242, 242, 242); line-height: normal; margin: 0in 0in 0pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9pt;&quot;&gt;Creating table MyTable...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&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&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/311627711030239651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/how-to-create-table-using-t-sql-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/311627711030239651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/311627711030239651'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/how-to-create-table-using-t-sql-command.html' title='How to CREATE a table using T-SQL command'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-6557079346184908541</id><published>2012-08-01T05:00:00.000-07:00</published><updated>2012-09-15T22:14:45.955-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>What is SQL</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;SQL stands for &lt;strong&gt;S&lt;/strong&gt;tructured
&lt;strong&gt;Q&lt;/strong&gt;uery &lt;strong&gt;L&lt;/strong&gt;anguage. SQL is a standard language used to access data in Database
Management Systems. Almost all the databases implement the standard version of SQL,
making it portable across database management systems.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;strong&gt;Basic SQL Syntax&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-bidi-theme-font: minor-bidi; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;SELECT&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Table_Name&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;WHERE&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Conditional_Statement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;GROUP&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;HAVING&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Conditional_Statement&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;ORDER&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas;&quot;&gt;BY &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: teal; font-family: Consolas;&quot;&gt;Column_List&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: grey; font-family: Consolas;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana;&quot;&gt;Click &lt;a href=&quot;http://sql-server-guide.blogspot.com/2012/09/t-sql-clauses-most-commonly-used-t-sql.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: large;&quot;&gt; &lt;/span&gt;to learn about the above&amp;nbsp;T-SQL clauses!&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/6557079346184908541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/what-is-sql-sql-stands-for-s-tructured.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/6557079346184908541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/6557079346184908541'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/what-is-sql-sql-stands-for-s-tructured.html' title='What is SQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3341028127574374470</id><published>2012-07-02T20:44:00.000-07:00</published><updated>2012-10-04T22:18:18.931-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><title type='text'>SQL Server Table Name Limitations</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;T&lt;i&gt;able Name&lt;/i&gt;&lt;/b&gt; in SQL Server can be a maximum of
128 characters (except local temporary table names that cannot exceed 116
characters) and must follow &lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;identifier&lt;/b&gt;
rules undermentioned:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;The first character must be one of the following&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;o&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Character from a-z or A-Z&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;o&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Underscore (_), at sign (@), or number sign (#)&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&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;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If a table name starts with number sign (#) then this table will be created as &lt;strong&gt;temporary table&lt;/strong&gt; in TempDB and will be access only through current connection.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If a table name starts with double number sign (##) then this table will be created as &lt;strong&gt;global temporary table&lt;/strong&gt; in TempDB and will be access only through current connection.&lt;/div&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;

&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Subsequent characters can include the following:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;o&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Character a-z or A-Z&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;o&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Digit 0-9&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;o&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Underscore (_), at sign (@), number sign (#) or
dollar sign ($)&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;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;The identifier must not be a T-SQL reserved
word. &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;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;·&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Special characters are not allowed.&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://sql-server-guide.blogspot.com/feeds/3341028127574374470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/sql-server-table-name-limitations-t.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3341028127574374470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3341028127574374470'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/sql-server-table-name-limitations-t.html' title='SQL Server Table Name Limitations'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5455596704304801564</id><published>2012-07-01T22:20:00.000-07:00</published><updated>2012-08-18T16:07:20.436-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server 2012"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>CREATE a Database</title><content type='html'>&lt;b&gt;&lt;span style=&quot;color: #20124d; font-size: large;&quot;&gt;What is a database&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
A database in SQL Server is made up of a collection of tables that stores a specific set of structured data. A table contains a collection of rows, also referred to as records or tuples, and columns, also referred to as attributes. Each column in the table is designed to store a certain type of information, for example, dates, names, dollar amounts, and numbers.&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div&gt;
&lt;/div&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;color: #20124d; font-size: large;&quot;&gt;How to create a Database in SQL Server?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
We can create databas in SQL Server by following ways:&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
1. &lt;b&gt;Through SQL Server Management Studio&lt;/b&gt;&lt;br /&gt;
2. &lt;b&gt;Through T-SQL command.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div&gt;
&lt;/div&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;Create a database SQL Server Management Studio (SSMS):&lt;/b&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;In &lt;span class=&quot;label&quot;&gt;Object Explorer&lt;/span&gt;, connect to an instance of the SQL Server Database Engine and then expand that instance.&lt;/li&gt;
&lt;li&gt;Right-click &lt;span class=&quot;label&quot;&gt;Databases&lt;/span&gt;, and then click &lt;span class=&quot;label&quot;&gt;New Database&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;span class=&quot;label&quot;&gt;New Database&lt;/span&gt;, enter a database name.&lt;/li&gt;
&lt;li&gt;To create the database by accepting all default values, click &lt;span class=&quot;label&quot;&gt;OK&lt;/span&gt;; otherwise, continue with the following optional steps.&lt;/li&gt;
&lt;li&gt;To change the owner name, click (&lt;span class=&quot;label&quot;&gt;…&lt;/span&gt;) to select another owner.&lt;/li&gt;
&lt;li&gt;To change the default values of the primary data and transaction log files, in the &lt;span class=&quot;label&quot;&gt;Database files&lt;/span&gt; grid, click the appropriate cell and enter the new value.&lt;/li&gt;
&lt;li&gt;To change the collation of the database, select the &lt;span class=&quot;label&quot;&gt;Options&lt;/span&gt; page, and then select a collation from the list.&lt;/li&gt;
&lt;li&gt;To change the recovery model, select the &lt;span class=&quot;label&quot;&gt;Options&lt;/span&gt; page and select a recovery model from the list.&lt;/li&gt;
&lt;li&gt;To change database options, select the &lt;span class=&quot;label&quot;&gt;Options&lt;/span&gt; page, and then modify the database options.&lt;/li&gt;
&lt;li&gt;To add a new filegroup, click the &lt;span class=&quot;label&quot;&gt;Filegroups&lt;/span&gt; page. Click &lt;span class=&quot;label&quot;&gt;Add&lt;/span&gt; and then enter the values for the filegroup.&lt;/li&gt;
&lt;li&gt;To add an extended property to the database, select the &lt;span class=&quot;label&quot;&gt;Extended Properties&lt;/span&gt; page. &lt;div&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;In the &lt;span class=&quot;label&quot;&gt;Name&lt;/span&gt; column, enter a name for the extended property.&lt;/li&gt;
&lt;li&gt;In the &lt;span class=&quot;label&quot;&gt;Value&lt;/span&gt; column, enter the extended property text. For example, enter one or more statements that describe the database.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;To create the database, click &lt;span class=&quot;label&quot;&gt;OK&lt;/span&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div&gt;
&lt;/div&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;Create a database using T-SQL:&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;div&gt;
&lt;/div&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;USE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: teal;&quot;&gt;[master]&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;CREATE&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;DATABASE&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;[DatabaseName]&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;NAME&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;N&#39;DatabaseName&#39;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;--Logical data-file name&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FILENAME&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;N&#39;D:\Microsoft SQL
Server\MSSQL\DATA\DatabaseName.mdf&#39;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 13px;&quot;&gt;--Data file&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;SIZE&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 2048&lt;span style=&quot;color: teal;&quot;&gt;KB &amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 13px;&quot;&gt;--You can specify the size as per your requirement&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;MAXSIZE&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;UNLIMITED&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;FILEGROWTH&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1024&lt;span style=&quot;color: teal;&quot;&gt;KB&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: magenta; font-family: Consolas; font-size: 9.5pt;&quot;&gt;LOG&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;NAME&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;N&#39;DatabaseName_log&#39;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;--Logical log-file name&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;FILENAME&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;N&#39;D:\Microsoft SQL
Server\MSSQL\LOG\DatabaseName_log.ldf&#39;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 13px;&quot;&gt;--Log file&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;SIZE&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1024&lt;span style=&quot;color: teal;&quot;&gt;KB&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;MAXSIZE&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 2048&lt;span style=&quot;color: teal;&quot;&gt;GB&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: grey;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;FILEGROWTH&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; 1024&lt;span style=&quot;color: teal;&quot;&gt;KB&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f2f2f2; margin-bottom: 0pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0in 0in 0pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Arguments&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;

&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;DatabaseName&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the name of new database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;NAME&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the logical file name. Name is required when FILENAME is specified.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FILENAME&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the physical (operating system) file name. This is the path and file name used by the operating system when you create the file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SIZE&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the initial size of the file. The kilobyte (KB), megabyte (MB), gigabyte (GB), or terabyte (TB) suffixes can be used. The default is MB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;MAXSIZE&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the max size to which the file can grow. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol; font-size: 12pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;FILEGROWTH&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt; is the automatic growth increment of the file. This is the amount of space added to the file every time new space is required&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Once
database is created, we can create other objects in the databases like Table,
View, Stored Procedure, Functions, Triggers etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5455596704304801564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/create-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5455596704304801564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5455596704304801564'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2012/08/create-database.html' title='CREATE a Database'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5512880225555234676</id><published>2011-10-04T21:18:00.000-07:00</published><updated>2012-10-04T21:28:13.088-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="UDF"/><title type='text'>User Defined Functions (UDF)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010/07/what-is-user-defined-function-udf-in.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What are User Defined Functions (UDF) in SQL Server?&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2010_07_01_archive.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Types of User Defined Functions in SQL Server?&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/07/difference-between-function-and-stored.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Difference between Function and Stored Procedure?&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5512880225555234676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/10/user-defined-functions-udf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5512880225555234676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5512880225555234676'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/10/user-defined-functions-udf.html' title='User Defined Functions (UDF)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-2407365766654204918</id><published>2011-07-09T17:46:00.000-07:00</published><updated>2012-10-04T21:22:13.875-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><category scheme="http://www.blogger.com/atom/ns#" term="UDF"/><title type='text'>Difference between Function and Stored Procedure?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul&gt;
&lt;li&gt;User Defined Function (UDF) can be used in the SQL statements anywhere in the SELECT, WHERE, and HAVING section where as Stored procedures cannot be used.&lt;/li&gt;
&lt;li&gt;Functions are designed to send their output to a query or T-SQL statement while Stored Procedures use EXECUTE or EXEC to run.&lt;/li&gt;
&lt;li&gt;We can not use EXECUTE and PRINT commands inside a function but in SPROC&lt;/li&gt;
&lt;li&gt;UDFs that return tables can be treated as another rowset. This can be used in JOINs with other tables.&lt;/li&gt;
&lt;li&gt;UDFs can&#39;t change the server environment or your operating system environment, while a SPROC can.&lt;/li&gt;
&lt;li&gt;Inline UDF&#39;s can be though of as views that take parameters and can be used in JOINs and other Rowset operations.&lt;/li&gt;
&lt;li&gt;Stored Procedures are stored in compiled format in the database where as Functions are compiled and excuted runtime.&lt;/li&gt;
&lt;li&gt;SPROC can be used with XML FOR Clause but Functions can not be.&lt;/li&gt;
&lt;li&gt;SPROC can have transaction but not Functions.&lt;/li&gt;
&lt;li&gt;Functions can be used in a SPROC but SPROC cann&#39;t be used in a Function. Only extended stored procedures can be called from a function.&lt;/li&gt;
&lt;li&gt;Of course there will be Syntax differences and here is a sample of that &lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE PROCEDURE&lt;/span&gt; dbo.ProcedureName&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; @parameter1 datatype = DefaultValue,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; @parameter2 datatype &lt;span style=&quot;color: blue;&quot;&gt;OUTPUT&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;AS&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; T-SQL statements&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;RETURN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE FUNCTION&lt;/span&gt; dbo.FunctionName&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; @parameter1 datatype = DefaultValue,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; @parameter2 datatype&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;RETURNS&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;datatype&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; SQL Statement&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; RETURN &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;Value&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/2407365766654204918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/07/difference-between-function-and-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/2407365766654204918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/2407365766654204918'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/07/difference-between-function-and-stored.html' title='Difference between Function and Stored Procedure?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-8189417022680773007</id><published>2011-05-27T13:07:00.000-07:00</published><updated>2012-10-08T13:46:51.924-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="JOINs"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><title type='text'>Explain SQL Server JOINs with examples?</title><content type='html'>I will explain types of SQL JOINs in in this article. JOINs in SQL Server can be classified as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;• INNER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;• LEFT OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;• RIGHT OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;• FULL OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;• CROSS JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Each type is explained below with suitable examples:&lt;br /&gt;
Let’s consider two tables as Table1 &amp;amp; Table2 for our example.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;– CREATE TEST TABLES&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; Table1(ID [int], Code [varchar](10));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE&lt;/span&gt; Table2(ID [int], Amount [int]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;– INSERT DUMMY DATA&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO&lt;/span&gt; Table1 &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(1,’AAA’),(2,’BBB’),(3,’CCC’)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO&lt;/span&gt; Table2 &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(1,50),(2,30),(4,40)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&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/AVvXsEhNNxg0Utoc-uK0Q6sRlIp3pv5gaz1W1ofQSbBJGG3NepV3ql4VVFM_yhyFsyYGXOmWFAS5pvlHM_Dvk4maFX4LLVzc3bkeOKoRDYSWOw3rfYW7Mt23-EB7dBkTOkPdOi45tVdeQs4Mcvep/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNNxg0Utoc-uK0Q6sRlIp3pv5gaz1W1ofQSbBJGG3NepV3ql4VVFM_yhyFsyYGXOmWFAS5pvlHM_Dvk4maFX4LLVzc3bkeOKoRDYSWOw3rfYW7Mt23-EB7dBkTOkPdOi45tVdeQs4Mcvep/s320/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;INNER JOIN:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Inner joins return rows only when there is at least one row from both tables that matches the join condition. Inner joins eliminate the rows that do not match with a row from the other table. Below is the query for inner join:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Table1 A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;INNER JOIN&lt;/span&gt; Table2 B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; ON&lt;/span&gt; A.ID = B.ID&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&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/AVvXsEiEuFYk6G3h_n1-2-jR9FADv9x_eL5qT7hJEsibHEnpG7wegX_Hn9B0w0X5znUgXWsL8tNzuVuDodBXz3ntWRGC_EFHvUoo-s6JGyqyJEKv6pf8P4zlzVL6NSxVj47Y0ZbrgChJaw2m2GsC/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEuFYk6G3h_n1-2-jR9FADv9x_eL5qT7hJEsibHEnpG7wegX_Hn9B0w0X5znUgXWsL8tNzuVuDodBXz3ntWRGC_EFHvUoo-s6JGyqyJEKv6pf8P4zlzVL6NSxVj47Y0ZbrgChJaw2m2GsC/s400/1.png&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;LEFT OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Left Outer joins return all rows from the left table referenced with a left outer join and matching rows from other table. Unmatched records will be NULL. Below is the query for Left Outer Join:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Table1 A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;LEFT OUTER JOIN&lt;/span&gt; Table2 B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; ON&lt;/span&gt; A.ID = B.ID&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&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/AVvXsEgxAn7nz8by6BDYTtQlT8mxP42EbcbU7H_ChxJ-R0A7rJ-eZNciQ9oCiTpaCyUObUhZlMp-Rr9PO8dvaW-Q0Lf_gHsfwvvCNz0PtuKkGnVZewl5zG5XTNIPetPX0FbJeWoqp0ujOOH5Ln80/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxAn7nz8by6BDYTtQlT8mxP42EbcbU7H_ChxJ-R0A7rJ-eZNciQ9oCiTpaCyUObUhZlMp-Rr9PO8dvaW-Q0Lf_gHsfwvvCNz0PtuKkGnVZewl5zG5XTNIPetPX0FbJeWoqp0ujOOH5Ln80/s400/1.png&quot; width=&quot;246&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;RIGHT OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Right Outer joins return all rows from the right table referenced with a right outer join and matching rows from other table. Unmatched records will be NULL. Below is the query for Right Outer Join:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Table1 A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;RIGHT OUTER JOIN &lt;/span&gt;Table2 B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; A.ID = B.ID&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRqHhbw3Ve18hxiJg_aEVKYhu0F3VE-KPn_DcaO_DrCqsIZjEUeh00pKY4kZDUP_86ruvR4NMDSxsz0rxQXyav3S2uo7Gtb4dA1wtUDC4u0hEYEpo67EX4G_OzRELU1Q21rUcKQ_wTqkWp/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRqHhbw3Ve18hxiJg_aEVKYhu0F3VE-KPn_DcaO_DrCqsIZjEUeh00pKY4kZDUP_86ruvR4NMDSxsz0rxQXyav3S2uo7Gtb4dA1wtUDC4u0hEYEpo67EX4G_OzRELU1Q21rUcKQ_wTqkWp/s400/1.png&quot; width=&quot;283&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;FULL&amp;nbsp;OUTER JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
Full Outer joins return all rows from both the tables. Unmatched records will be NULL. Below is the query for Full Outer Join:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; * &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Table1 A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FULL OUTER JOIN&lt;/span&gt; Table2 B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; A.ID = B.ID&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBg7pDogVQ-NhsddHObqyyzUYujDaDhFADazSKa8JvoPEuH501zArHqTlqiVjflIz4F3XV6eoob-rMXtuS356zF_Jaf3G195MGiWM0cRpPm-aho_6SGu5syIRhnGsl08T9UrBqsnlGqCCT/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBg7pDogVQ-NhsddHObqyyzUYujDaDhFADazSKa8JvoPEuH501zArHqTlqiVjflIz4F3XV6eoob-rMXtuS356zF_Jaf3G195MGiWM0cRpPm-aho_6SGu5syIRhnGsl08T9UrBqsnlGqCCT/s400/1.png&quot; width=&quot;237&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;&lt;span style=&quot;color: #073763;&quot;&gt;CROSS JOIN&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
In cross joins, each row from first table joins with all the rows of another table. If there are m rows from Table1 and n rows from Table2 then result set of these tables will have m*n rows. Below is the query for &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; * &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Table1 A&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CROSS JOIN &lt;/span&gt;Table2 B&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj7GbkDUmI3VnCJ_hPYaC362AR3dsULEOEeGQczMIP9Ga4wGtNx1ejxtK-0Ae-Y1l0aMoyeMwovarOKKYYhtHgJzpM011traNT5fpdIsFHov6vcOilvkMHd5R9iI9MihCCmChK3B8Cs2dX/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; ru=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj7GbkDUmI3VnCJ_hPYaC362AR3dsULEOEeGQczMIP9Ga4wGtNx1ejxtK-0Ae-Y1l0aMoyeMwovarOKKYYhtHgJzpM011traNT5fpdIsFHov6vcOilvkMHd5R9iI9MihCCmChK3B8Cs2dX/s400/1.png&quot; width=&quot;236&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/8189417022680773007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/05/explain-sql-server-joins-with-examples.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8189417022680773007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8189417022680773007'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/05/explain-sql-server-joins-with-examples.html' title='Explain SQL Server JOINs with examples?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNNxg0Utoc-uK0Q6sRlIp3pv5gaz1W1ofQSbBJGG3NepV3ql4VVFM_yhyFsyYGXOmWFAS5pvlHM_Dvk4maFX4LLVzc3bkeOKoRDYSWOw3rfYW7Mt23-EB7dBkTOkPdOi45tVdeQs4Mcvep/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5544781521147944211</id><published>2011-04-04T22:06:00.000-07:00</published><updated>2012-10-04T22:07:43.440-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><title type='text'>Stored Procedure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/03/what-is-stored-procedure.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;What is Stored Procedure?&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://sql-server-guide.blogspot.com/2011/07/difference-between-function-and-stored.html&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Difference Between Function and Stored Procedure?&lt;/span&gt;&lt;/a&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://sql-server-guide.blogspot.com/feeds/5544781521147944211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/04/stored-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5544781521147944211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5544781521147944211'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/04/stored-procedure.html' title='Stored Procedure'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5902621117050737950</id><published>2011-03-20T23:25:00.000-07:00</published><updated>2012-11-03T20:31:28.556-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>How to find all the IDENTITY columns in a database?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Here is the easiest way to list all the &lt;strong&gt;IDENTITY Columns&lt;/strong&gt; of any database:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;SELECT&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: magenta; font-size: x-small;&quot;&gt;OBJECT_NAME&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;[object_id]&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;as&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; TableName&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;name &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;as&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; ColumnName&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;FROM&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; [DatabaseName]&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;sys&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;columns&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;WHERE&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; is_identity &lt;/span&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;&lt;span style=&quot;color: grey; font-size: x-small;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; 1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5902621117050737950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/how-to-find-all-identity-columns-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5902621117050737950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5902621117050737950'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/how-to-find-all-identity-columns-in.html' title='How to find all the IDENTITY columns in a database?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-1292843915178754479</id><published>2011-03-05T01:10:00.000-08:00</published><updated>2012-10-04T22:04:16.168-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure"/><title type='text'>What is Stored Procedure?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A &lt;strong&gt;stored procedure&lt;/strong&gt; is the saved collection of T-SQL statements in the SQL Server database that can take and return user-supplied parameters. Stored Procedures (also called sproc) can have input parameters and output parameters.&amp;nbsp;Same stored procedure can be used over the network by several clients by passing different input data for input parameters. When&amp;nbsp;a stored&amp;nbsp;procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance.&lt;br /&gt;
&lt;br /&gt;
Here is the syntax of SPROC:&lt;br /&gt;
&lt;br /&gt;
CREATE PROC [ EDURE ] [owner.] ProcedureName&lt;br /&gt;
[ { @parameter data_type } [= DefaultValue] [OUTPUT] ] [ ,...n ] &lt;br /&gt;
[ WITH { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ] &lt;br /&gt;
AS &lt;br /&gt;
BEGIN&lt;br /&gt;
&amp;nbsp;&amp;nbsp; T-SQL-statements&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE PROC&lt;/span&gt; ProductList (&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; @ProductType &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(30) = &lt;span style=&quot;color: red;&quot;&gt;&#39;Electronics&#39;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;WITH ENCRYPTION&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;AS&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;BEGIN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp; SELECT&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductName, ProductType, &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Model, UnitPrice &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; Products (&lt;span style=&quot;color: blue;&quot;&gt;NOLOCK&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; ProductType = @ProductType&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
How to execute:&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;-- Return all the products belongs to Electronics&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXECUTE&lt;/span&gt; ProductList &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d;&quot;&gt;-- Return all the products belongs to Auto Mobiles&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;EXECUTE&lt;/span&gt; ProductList &lt;span style=&quot;color: red;&quot;&gt;&#39;Auto Mobiles&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;strong&gt;SQL Statement Limitations in a Procedure&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
Any SET statement can be specified inside a stored procedure except SET SHOWPLAN_TEXT and SET SHOWPLAN_ALL, which must be the only statements in the batch. &lt;br /&gt;
&lt;br /&gt;
Inside a stored procedure, object names used with certain statements must be qualified with the name of the object owner if other users are to use the stored procedure. The statements are: &lt;br /&gt;
•ALTER TABLE&lt;br /&gt;
•CREATE INDEX&lt;br /&gt;
•CREATE TABLE&lt;br /&gt;
•All DBCC statements&lt;br /&gt;
•DROP TABLE&lt;br /&gt;
•DROP INDEX&lt;br /&gt;
•TRUNCATE TABLE&lt;br /&gt;
•UPDATE STATISTICS&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Permissions&lt;/strong&gt;&lt;br /&gt;
CREATE PROCEDURE permissions default to members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles. Members of the sysadmin fixed server role and the db_owner fixed database role can transfer CREATE PROCEDURE permissions to other users. Permission to execute a stored procedure is given to the procedure owner, who can then set execution permission for other database users.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/1292843915178754479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/what-is-stored-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/1292843915178754479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/1292843915178754479'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/what-is-stored-procedure.html' title='What is Stored Procedure?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-2853097093059551199</id><published>2011-03-01T00:08:00.000-08:00</published><updated>2012-11-03T20:33:17.837-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Function"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>Function to Convert Decimal Number into Binary, Ternary, and Octal</title><content type='html'>In this article I am sharing user defined &lt;strong&gt;function&lt;/strong&gt; to convert a decimal number into Binary, Ternary, and Octalequivalent.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;OBJECT_ID&lt;/span&gt;(&lt;span style=&quot;color: red;&quot;&gt;N&#39;dbo.udfGetNumbers&#39;&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;N&#39;TF&#39;&lt;/span&gt;) &lt;span style=&quot;color: #666666;&quot;&gt;IS NOT NULL&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;DROP FUNCTION &lt;span style=&quot;color: black;&quot;&gt;dbo.udfGetNumbers&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE FUNCTION&lt;/span&gt; dbo.udfGetNumbers &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(@base [int], @lenght [int]) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;RETURNS &lt;/span&gt;@NumbersBaseN &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;( &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; decNum&amp;nbsp;[int] &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY KEY&lt;/span&gt; &lt;span style=&quot;color: #999999;&quot;&gt;NOT NULL&lt;/span&gt;, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; NumBaseN [varchar](50) &lt;span style=&quot;color: #999999;&quot;&gt;NOT NULL &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;AS &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;BEGIN &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; WITH&lt;/span&gt; tblBase &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; ( &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(0 &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;VARCHAR&lt;/span&gt;(50)) &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;baseNum &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;UNION&lt;/span&gt; &lt;span style=&quot;color: #999999;&quot;&gt;ALL &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;((baseNum + 1) &lt;span style=&quot;color: blue;&quot;&gt;AS VARCHAR&lt;/span&gt;(50)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; tblBase &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; baseNum &amp;lt; @base-1 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; ),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; numbers &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;(baseNum &lt;span style=&quot;color: blue;&quot;&gt;AS VARCHAR&lt;/span&gt;(50)) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; num &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; tblBase &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;UNION&lt;/span&gt; &lt;span style=&quot;color: #999999;&quot;&gt;ALL&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;((t2.baseNum + num) &lt;span style=&quot;color: blue;&quot;&gt;AS VARCHAR&lt;/span&gt;(50)) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; numbers &lt;span style=&quot;color: #999999;&quot;&gt;CROSS JOIN&lt;/span&gt; tblBase t2 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;LEN&lt;/span&gt;(NUM) &amp;lt; @lenght&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; ) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO &lt;/span&gt;@NumbersBaseN &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &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: blue;&quot;&gt;OVER &lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; NUM) -1 &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;rowID, NUM &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; numbers &lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; LEN(NUM) &amp;gt; @lenght - 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;OPTION&lt;/span&gt; (MAXRECURSION 0); &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;RETURN&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;END&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;-- Unit Test --&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;-- Example with decimal, binary, ternary and octal &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; U1.decNum&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;Base10, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; U1.NumBaseN &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt;&amp;nbsp;Base2, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; U2.NumBaseN &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;Base3, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; U3.NumBaseN &lt;span style=&quot;color: blue;&quot;&gt;AS &lt;/span&gt;Base8 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; dbo.udfGetNumbers(2, 10) U1 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;JOIN &lt;/span&gt;dbo.udfGetNumbers(3, 7) U2 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; u1.decNum = u2.decNum &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #999999;&quot;&gt;JOIN&lt;/span&gt; dbo.udfGetNumbers(8, 4) U3 &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; u2.decNum = u3.decNum &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the output:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlKIfUxYqbXWSIvUhAFdgyJGTF6tZO2vNQrdE7Y_LYnp2KtXHZ_uhxPs98dfyPpd_VskKa04lF-5Kh3B8p4-8uBPxa5UJWOSvJ240DyTpKZdZdRyTpYCxO6xwItQL1V0WPrRrJ4ZuWME-n/s1600/Dec2Bin.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlKIfUxYqbXWSIvUhAFdgyJGTF6tZO2vNQrdE7Y_LYnp2KtXHZ_uhxPs98dfyPpd_VskKa04lF-5Kh3B8p4-8uBPxa5UJWOSvJ240DyTpKZdZdRyTpYCxO6xwItQL1V0WPrRrJ4ZuWME-n/s320/Dec2Bin.png&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/2853097093059551199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/function-to-convert-decimal-number-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/2853097093059551199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/2853097093059551199'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/03/function-to-convert-decimal-number-into.html' title='Function to Convert Decimal Number into Binary, Ternary, and Octal'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlKIfUxYqbXWSIvUhAFdgyJGTF6tZO2vNQrdE7Y_LYnp2KtXHZ_uhxPs98dfyPpd_VskKa04lF-5Kh3B8p4-8uBPxa5UJWOSvJ240DyTpKZdZdRyTpYCxO6xwItQL1V0WPrRrJ4ZuWME-n/s72-c/Dec2Bin.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-9119137691967225884</id><published>2011-02-01T00:50:00.000-08:00</published><updated>2012-11-03T20:33:17.845-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Challenge"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Transactions"/><title type='text'>Fun with TRANSACTION</title><content type='html'>What will be output of below T-SQL code:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE &lt;/span&gt;MyTable &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; MyId [INT] &lt;span style=&quot;color: blue;&quot;&gt;IDENTITY &lt;/span&gt;(1,1),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; MyCity [NVARCHAR](50)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;BEGIN TRANSACTION&lt;/span&gt; OuterTran&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO &lt;/span&gt;MyTable &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt; (&lt;span style=&quot;color: red;&quot;&gt;&#39;Boston&#39;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN TRANSACTION &lt;/span&gt;InnerTran&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO&lt;/span&gt; MyTable &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt; (&lt;span style=&quot;color: red;&quot;&gt;&#39;London&#39;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ROLLBACK&lt;/span&gt; WORK&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;IF &lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;@@TRANCOUNT&lt;/span&gt; = 0)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;BEGIN&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINT &lt;span style=&quot;color: red;&quot;&gt;&#39;All transactions were rolled back&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINT&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;Outer transaction is rolling back...&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;ROLLBACK&lt;/span&gt; WORK&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE&lt;/span&gt; MyTable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Here are the options:&lt;/strong&gt;&lt;br /&gt;1.&amp;nbsp;&amp;nbsp; All transactions were rolled back &lt;br /&gt;2.&amp;nbsp;&amp;nbsp; Outer transaction is rolling back... &lt;br /&gt;3.&amp;nbsp;&amp;nbsp; ERROR: Incorrect syntax near &#39;WORK&#39;. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;Correct answer: &lt;strong&gt;All transactions were rolled back&lt;/strong&gt; &lt;br /&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: Issuing a ROLLBACK WORK rolls back all the way to the outer BEGIN TRANSACTION</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/9119137691967225884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/02/fun-with-transaction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/9119137691967225884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/9119137691967225884'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/02/fun-with-transaction.html' title='Fun with TRANSACTION'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-5785905725236625850</id><published>2011-01-15T23:24:00.000-08:00</published><updated>2012-11-03T20:33:17.841-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Backup and Restore"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>How to get SQL Server Restore history using T-SQL?</title><content type='html'>How to find SQL Server databases &lt;strong&gt;Restore History&lt;/strong&gt;?&lt;br /&gt;How to find Last Restore Date od SQL Server database?&lt;br /&gt;&lt;br /&gt;Few developers asked me how to find the last time a database was restored using T-SQL. I have formed the following query using &lt;strong&gt;MSDB..RestoreHistory&lt;/strong&gt; table.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; *&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; MSDB..RestoreHistory WITH (&lt;span style=&quot;color: blue;&quot;&gt;nolock&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; destination_database_name = &lt;span style=&quot;color: red;&quot;&gt;&#39;DatabaseName&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;ORDER BY&lt;/span&gt; restore_date &lt;span style=&quot;color: blue;&quot;&gt;DESC&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/5785905725236625850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/how-to-get-sql-server-restore-history.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5785905725236625850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/5785905725236625850'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/how-to-get-sql-server-restore-history.html' title='How to get SQL Server Restore history using T-SQL?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-8910577030317729145</id><published>2011-01-07T22:29:00.000-08:00</published><updated>2012-11-03T20:33:17.844-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Questions"/><category scheme="http://www.blogger.com/atom/ns#" term="LOCK"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>What is lock escalation?</title><content type='html'>&lt;span style=&quot;color: #134f5c;&quot;&gt;&lt;strong&gt;Lock escalation&lt;/strong&gt; is the process of converting a lot of low level locks (For example row locks, and page locks) into higher level locks (e.g. table locks). Every lock is a memory structure too many locks would mean, more memory being occupied by locks. To prevent this from happening, SQL Server escalates the many fine-grain locks to fewer coarse-grain locks. Lock escalation threshold was definable in SQL Server 6.5, but from SQL Server 7.0 onwards it&#39;s dynamically managed by SQL Server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;In the hierarchy of the objects in a SQL Server instance, at the top level we have Database, followed by Schema, Tables, Table Partitions, Pages and then finally the individual Rows. If you acquire a lock at higher level, it can cover more resources there by you consume fewer lock resources (each lock structure takes approximately 100 bytes) and the locking overhead but this comes at a price of lower concurrency. So for example, if you want to select all the rows of a table, if you acquire a lock at table level, you will not need to lock individual rows or pages but then it will block any concurrent update transaction. Similarly, if you lock individual rows, you will get higher concurrency but then you will incur the overhead of acquiring/releasing locks on each row and lot more locking resources depending upon the isolation level of your transaction, as you may need to hold the locks on all the rows till the end of transaction.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #134f5c;&quot;&gt;Depending upon the estimates during query compilation, the SQL Server recommends the locking granularity (i.e. row, page or table) appropriately and during query execution, depending on the concurrent work load, the appropriate locking granularity is applied. User can override the locking granularity option explicitly by providing locking hints and/or by executing sp_indexoption stored procedure. While locking granularity is chosen at the start of query execution but during the execution, the SQL Server may choose to escalate the lock to lower level of granularity depending on the number of locks acquired and the availability of memory at run time.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/8910577030317729145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/what-is-lock-escalation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8910577030317729145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/8910577030317729145'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/what-is-lock-escalation.html' title='What is lock escalation?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1774609031631111510.post-3841320015166089904</id><published>2011-01-01T01:01:00.000-08:00</published><updated>2012-11-03T20:33:17.838-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Challenge"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>T-SQL Challenge</title><content type='html'>What will be the output of below T-SQL code:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;CREATE TABLE &lt;/span&gt;#TestDate&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; [ID] &lt;span style=&quot;color: blue;&quot;&gt;int IDENTITY&lt;/span&gt;(1,1)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; ,[FullDate] &lt;span style=&quot;color: blue;&quot;&gt;datetime&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;DEFAULT&lt;/span&gt; (&lt;span style=&quot;color: magenta;&quot;&gt;GETDATE&lt;/span&gt;()),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;INSERT INTO&lt;/span&gt; #TestDate &lt;span style=&quot;color: blue;&quot;&gt;VALUES&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;(&lt;span style=&quot;color: red;&quot;&gt;&#39;01/07/2010&#39;&lt;/span&gt;),(&lt;span style=&quot;color: red;&quot;&gt;&#39;2010/07/01&#39;&lt;/span&gt;),(&lt;span style=&quot;color: red;&quot;&gt;&#39;07/01/2010&#39;&lt;/span&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;COUNT&lt;/span&gt;([FullDate]) &lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; #TestDate&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;WHERE&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;CAST&lt;/span&gt;([FullDate] &lt;span style=&quot;color: blue;&quot;&gt;as int&lt;/span&gt;) = 40358&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;DROP TABLE &lt;span style=&quot;color: black;&quot;&gt;#TestDate&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;GO&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer this without cheating (without executing&amp;nbsp;the Query). Here are the options:&lt;br /&gt;&lt;br /&gt;A.&amp;nbsp;&amp;nbsp; 1&lt;br /&gt;B.&amp;nbsp;&amp;nbsp; 2&lt;br /&gt;C.&amp;nbsp;&amp;nbsp; 3&lt;br /&gt;D.&amp;nbsp;&amp;nbsp; Error&lt;br /&gt;F.&amp;nbsp;&amp;nbsp; None of the above&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Correct Answer is &lt;span style=&quot;color: red;&quot;&gt;B&lt;/span&gt;.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Reason&lt;/strong&gt;: Dates &lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;07/01/2010&lt;/span&gt; and &lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;2010/07/01&lt;/span&gt; are inserted as &lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;2010-07-01 00:00:00.000&lt;/span&gt; in the database which is equal to &lt;span style=&quot;color: #cc0000;&quot;&gt;40358&lt;/span&gt; of int type. So when the conversion into int and then taking ceiling of the values, these 2 records generate the same values. However, 01/07/2010 is saved as &lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;2010-01-07 00:00:00.000&lt;/span&gt; in the database which is equal to &lt;span style=&quot;color: #cc0000;&quot;&gt;40183&lt;/span&gt; of type int.</content><link rel='replies' type='application/atom+xml' href='http://sql-server-guide.blogspot.com/feeds/3841320015166089904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/t-sql-challenge.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3841320015166089904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1774609031631111510/posts/default/3841320015166089904'/><link rel='alternate' type='text/html' href='http://sql-server-guide.blogspot.com/2011/01/t-sql-challenge.html' title='T-SQL Challenge'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/13191568517405972810</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>