> 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/joins.md).

# Joins

```
select attributes from r1, r2 where r1.attribute=r2.attribute
```

Joins are done using foreign keys.

A join can also be explicitly specified as follows:

```
select * from r natural join s
```
