--- title: "Joins" slug: "joins" updated: 2023-09-20T17:48:48Z published: 2023-09-20T17:48:48Z canonical: "docs.datajet.app/joins" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # Joins In order to perform cross-table operations, it is first necessary to join the tables. The Joins dialog is opened via **Engineering | Joins.** #### **![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1695232095351.png)** Joins can be also created by dropping the primary key field onto the foreign key field in the Database explorer. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1674234661032.png) #### Primary and foreign The **primary table** is the ONE side of a ONE-to-MANY relationship. The **foreign table** is the MANY side of a ONE-to-MANY relationship. #### Join restrictions Joins are only possible between continuous fields that have a matching field-type (for example STRING to STRING, DATE to DATE). This restriction does not apply to discrete fields. *If the primary field is continuous, then the foreign field must also be continuous. **TODO: Confirm*** Only one default join can exist at a time between tables. The direction in which tables are joined will affect the results returned - pay careful attention to this when engineering and ensure that the results returned are as intended. DataSet Operations across un-joined tables will return a {...} result. #### Join performance Creating joins usually takes seconds, but on tables of hundreds of millions of rows it could take some minutes to link continuous fields. It is significantly faster on very large tables to work with numeric keys rather than string keys. #### Working with joins in script Joins can be added to scripts by using the AddJoin and DeleteJoin method from **Script Editor | methods | data model** Use **Script Editor | Import Definitions** to add existing joins to scripts