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

# /create/jointable

```
URL: http://<db.host>:<db.port>/create/jointable
```

Creates a table that is the result of a SQL JOIN.

For join details and examples see: [Joins](../../concepts/joins/).  For
limitations, see
[Join Limitations and Cautions](../../concepts/joins/#limitations-cautions).

## Input Parameter Description

<ParamField body="join_table_name" type="string">
  Name of the join table to be created, in \[schema\_name.]table\_name format, using standard [name resolution rules](../../concepts/tables/#table-name-resolution) and meeting [table naming criteria](../../concepts/tables/#table-naming-criteria).
</ParamField>

<ParamField body="table_names" type="array of strings">
  The list of table names composing the join, each in \[schema\_name.]table\_name format, using standard [name resolution rules](../../concepts/tables/#table-name-resolution). Corresponds to a SQL statement FROM clause.
</ParamField>

<ParamField body="column_names" type="array of strings">
  List of member table columns or column expressions to be included in the join. Columns can be prefixed with 'table\_id.column\_name', where 'table\_id' is the table name or alias.  Columns can be aliased via the syntax 'column\_name as alias'. Wild cards '*' can be used to include all columns across member tables or 'table\_id.*' for all of a single table's columns.  Columns and column expressions composing the join must be uniquely named or aliased--therefore, the '\*' wild card cannot be used if column names aren't unique across all tables.
</ParamField>

<ParamField body="expressions" type="array of strings">
  An optional list of expressions to combine and filter the joined tables.  Corresponds to a SQL statement WHERE clause. For details see: [expressions](../../concepts/expressions/).

  The default value is an empty array ( \[] ).
</ParamField>

<ParamField body="options" type="map of string to strings">
  Optional parameters.

  The default value is an empty map ( \{} ).

  <Expandable title="options">
    <ParamField body="create_temp_table">
      If *true*, a unique temporary table name will be generated in the sys\_temp schema and used in place of input parameter *join\_table\_name*. This is always allowed even if the caller does not have permission to create tables. The generated name is returned in *qualified\_join\_table\_name*.

      The default value is `false`.

      The supported values are:

      * true
      * false
    </ParamField>

    <ParamField body="collection_name">
      \[DEPRECATED--please specify the containing schema for the join as part of input parameter *join\_table\_name* and use [/create/schema](/content/api/rest/create_schema_rest) to create the schema if non-existent]  Name of a schema for the join. If the schema is non-existent, it will be automatically created.

      The default value is ''.
    </ParamField>

    <ParamField body="max_query_dimensions">
      No longer used.
    </ParamField>

    <ParamField body="strategy_definition">
      The [tier strategy](../../rm/concepts/#tier-strategies) for the table and its columns.
    </ParamField>

    <ParamField body="ttl">
      Sets the [TTL](../../concepts/ttl/) of the join table specified in input parameter *join\_table\_name*.
    </ParamField>

    <ParamField body="view_id">
      View this projection is part of.

      The default value is ''.
    </ParamField>

    <ParamField body="no_count">
      Return a count of 0 for the join table for logging and for [/show/table](/content/api/rest/show_table_rest); optimization needed for large overlapped equi-join stencils.

      The default value is `false`.
    </ParamField>

    <ParamField body="chunk_size">
      Maximum number of records per joined-chunk for this table. Defaults to the gpudb.conf file chunk size.
    </ParamField>

    <ParamField body="enable_virtual_chunking">
      Collect chunks with accumulated size less than chunk\_size into a single chunk.

      The default value is `false`.
    </ParamField>

    <ParamField body="max_virtual_chunk_size">
      Maximum number of records per virtual-chunk. When set, enables virtual chunking. Defaults to chunk\_size if virtual chunking otherwise enabled.
    </ParamField>

    <ParamField body="min_virtual_chunk_size">
      Minimum number of records per virtual-chunk. When set, enables virtual chunking. Defaults to chunk\_size if virtual chunking otherwise enabled.
    </ParamField>

    <ParamField body="enable_sparse_virtual_chunking">
      Materialize virtual chunks with only non-deleted values.

      The default value is `false`.
    </ParamField>

    <ParamField body="enable_equi_join_lazy_result_store">
      Allow using the lazy result store to cache computation of one side of a multichunk equi-join.  Reduces computation but also reduces parallelism to the number of chunks on the other side of the equi-join.
    </ParamField>

    <ParamField body="enable_predicate_equi_join_lazy_result_store">
      Allow using the lazy result store to cache computation of one side of a multichunk predicate-equi-join. Reduces computation but also reduces parallelism to the number of chunks on the other side of the equi-join.
    </ParamField>

    <ParamField body="enable_pk_equi_join">
      Use equi-join to do primary key joins rather than using primary key index.
    </ParamField>
  </Expandable>
</ParamField>

## Output Parameter Description

The Kinetica server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query.  Here is a description of the various fields of the wrapper:

<ResponseField name="status" type="String">
  'OK' or 'ERROR'
</ResponseField>

<ResponseField name="message" type="String">
  Empty if success or an error message
</ResponseField>

<ResponseField name="data_type" type="String">
  'create\_join\_table\_response' or 'none' in case of an error
</ResponseField>

<ResponseField name="data" type="String">
  Empty string
</ResponseField>

<ResponseField name="data_str" type="JSON or String">
  This embedded JSON represents the result of the /create/jointable endpoint:

  <Expandable title="data_str">
    <ResponseField name="join_table_name" type="string">
      Value of input parameter *join\_table\_name*.
    </ResponseField>

    <ResponseField name="count" type="long">
      The number of records in the join table filtered by the given select expression.
    </ResponseField>

    <ResponseField name="info" type="map of string to strings">
      Additional information.

      The default value is an empty map ( \{} ).

      <Expandable title="info">
        <ResponseField name="qualified_join_table_name">
          The fully qualified name of the join table (i.e. including the schema).
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>

  Empty string in case of an error.
</ResponseField>
