> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Join Tables On

## Description

The `query()` function is executed on a data source connected to MindsDB and saved into a variable. It performs a join operation between tables.

## Syntax

Here is the syntax:

```sql theme={null}
my_data_source.query('SELECT * FROM my_table t JOIN another_table a ON t…=a… LIMIT 100')
```
