﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Mohammad Irfan  / SELECT Statement Questions / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 22:15:55 GMT</lastBuildDate><ttl>20</ttl><item><title>SELECT Statement Questions</title><link>http://www.sqlservercentral.com/Forums/Topic466076-1214-1.aspx</link><description>Hello All,I am a Newbie to SQL Server, and just finished an extensive online course covering everything from development to optimization.I have found that most of my questions are regarding syntax.In the following SELECT statement, the goal is to select only beverages from Northwind DB:-----------------USE NorthwindSELECT ProductNameFROM ProductsWHERE CategoryID IN(SELECT CategoryIDFROM CategoriesWhere CategoryName = 'Beverages')----------------------I am unclear as to why there is a "sub SELECT" statement after WHERE Category ID IN is.  The syntax is confusing to me.Would you please describe in basic terms why this query is built the way it is.  Thank you for your assistance.</description><pubDate>Fri, 07 Mar 2008 12:41:50 GMT</pubDate><dc:creator>robertafricker</dc:creator></item></channel></rss>