Select

The select clause is used to specify the attributes needed in the result of the query.

It corresponds to the projection operation in relational algebra.

select name from instructor

corresponds to Πname(instructor)\Pi _{name} (instructor)

Unlike relational algebra, the select operation allows duplicates in the result. To remove duplicates, we must use the distinct keyword. To retain duplicates, we can use the all keyword.

The * symbol can be used to retrieve all attributes.

Arithmetic operations can also be used in the select clause.

Last updated