> For the complete documentation index, see [llms.txt](https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/main-1/sql/dml-commands/select.md).

# 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 $$\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.
