SELECT

The SELECT statement specifies the columns of data you want to retrieve, where the columns are stored, what criteria the returned data must meet, and the sort order to be applied to the data. A SELECT statement can further group rows of data and assign retrieval criteria at the group level. The components of the SELECT statement are described in Table 21.2.

Table 21.2. Components of a SQL SELECT Statement
ComponentDescription
SELECTSpecifies the columns of data to be retrieved
FROMSpecifies the table/s from which to retrieve rows
WHERESpecifies criteria for which returned data must meet
GROUP BYFor aggregate queries, specifies the returned column/s by which the data is to be grouped
HAVINGFor aggregate queries, specifies criteria for which the ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.