<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Basics: query specification</title><link>http://blogs.msdn.com/tsql_language/archive/2004/09/23/233453.aspx</link><description>Let's start from basics, if it looks boring, feel free skip to the next post :-). I just feel I need to establish some terminology first. The main building block of SQL is what the standard calls "query specification". It consists of "clauses": SELECT,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Basics: query specification</title><link>http://blogs.msdn.com/tsql_language/archive/2004/09/23/233453.aspx#234019</link><pubDate>Fri, 24 Sep 2004 20:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:234019</guid><dc:creator>Martin</dc:creator><description>In my experience the union and union all are some of the most counterintuitive in all of SQL.  For the company I work at we give an interview test to candidates.  As part of the test the candidates are required to write a query using the union statement.  Almost invariably the answers apply the select distinct on the a subquery containing the union to eliminate duplicates.  Often the answers include comments talking about how important this is to eliminate duplicates.  the UNION statement implicitly eliminates all duplicates.  If you want duplicates then you must use the UNION ALL statement.&lt;br&gt;The reason for this is as I understand it is that the UNION statement is a set operator (remember your courses in statistics) borrowed from mathematics and really is outside of traditional programming language concepts which are based on coding algorithms.</description></item><item><title> TSQL language s WebLog Basics query specification | Patio Chairs</title><link>http://blogs.msdn.com/tsql_language/archive/2004/09/23/233453.aspx#9688690</link><pubDate>Wed, 03 Jun 2009 05:29:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9688690</guid><dc:creator> TSQL language s WebLog Basics query specification | Patio Chairs</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://patiochairsite.info/story.php?id=29709"&gt;http://patiochairsite.info/story.php?id=29709&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> TSQL language s WebLog Basics query specification | debt settlement program</title><link>http://blogs.msdn.com/tsql_language/archive/2004/09/23/233453.aspx#9753860</link><pubDate>Mon, 15 Jun 2009 19:59:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9753860</guid><dc:creator> TSQL language s WebLog Basics query specification | debt settlement program</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://edebtsettlementprogram.info/story.php?id=24171"&gt;http://edebtsettlementprogram.info/story.php?id=24171&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>