Tell Me
 

Writing a Basic Query

Previous previous|next Next Page

When Sheila writes a basic query, two mandatory clauses in the SELECT statement syntax are required: a SELECT clause and a FROM clause.

The SELECT statement syntax is displayed. The SELECT clause specifies the columns that you want to display. The FROM clause specifies the tables that contain those columns.

SELECT [DISTINCT] * | column [alias], ...
FROM table;

SELECT

Lists one or more columns

DISTINCT

Eliminates the display of dupicate rows

*

Selects all columns

COLUMN

Selects the named column

ALIAS

Gives selected columns a customized heading

FROM

Identifies the table or tables containing the columns