# 5: Joins

Je kan een query uitvoeren op meer dan 1 tabel. Tabellen zijn namelijk gekoppeld. Gegevens uit meerdere tabellen raadplegen in een `SELECT` opdracht. Alle tabellen die bij 1 raadpleging betrokken zijn, moeten worden opgesomd na het woord `FROM`.

Om problemen te vermijden moet je aangeven op welke wijze de gegevens uit de tabellen bestelling en bestelregel samengevoegd moeten worden. Dit moet gebeuren in de `WHERE`-clause. We spreken van een innerjoin, kort weg Join.&#x20;

Een query kan er zo uitzien:&#x20;

```sql
select Artist.name, Album.title
from Album, Artist 
where Album.ArtistId = Artist.ArtistId;
```

Dit geeft  een overzicht van alle album naam met de artist namen


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://metis-montessori-lyceum.gitbook.io/informatica/modules/databases/5-joins.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
