> ## 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_union

### create\_union

<ul>
  <li>
    create\_union(\
    &#x20;table\_name: string,\
    &#x20;table\_names: string\[],\
    &#x20;input\_column\_names: string\[]\[],\
    &#x20;output\_column\_names: string\[],\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateUnionResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionResponse.md)>

    Merges data from one or more tables with comparable data types into a new table.The following merges are supported:UNION (DISTINCT/ALL) - For data set union details and examples, see Union. For limitations, see Union Limitations and Cautions.INTERSECT (DISTINCT/ALL) - For data set intersection details and examples, see Intersect. For limitations, see Intersect Limitations.EXCEPT (DISTINCT/ALL) - For data set subtraction details and examples, see Except. For limitations, see Except Limitations.

    #### Parameters

    <ul>
      <li>
        table\_name: string

        Name of the table to be created, in \[schema\_name.]table\_name format, using standard name resolution rules and meeting table naming criteria.
      </li>

      <li>
        table\_names: string\[]

        The list of table names to merge, in \[schema\_name.]table\_name format, using standard name resolution rules. Must contain the names of one or more existing tables.
      </li>

      <li>
        input\_column\_names: string\[]\[]

        The list of columns from each of the corresponding input tables.
      </li>

      <li>
        output\_column\_names: string\[]

        The list of names of the columns to be stored in the output table.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateUnionResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionResponse.md)>

    Promise\<Types.CreateUnionResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:7476](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L7476)</li>
    </ul>
  </li>
</ul>

### create\_union\_request

<ul>
  <li>
    create\_union\_request(\
    &#x20;request: [CreateUnionRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateUnionResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionResponse.md)>

    Merges data from one or more tables with comparable data types into a new table.The following merges are supported:UNION (DISTINCT/ALL) - For data set union details and examples, see Union. For limitations, see Union Limitations and Cautions.INTERSECT (DISTINCT/ALL) - For data set intersection details and examples, see Intersect. For limitations, see Intersect Limitations.EXCEPT (DISTINCT/ALL) - For data set subtraction details and examples, see Except. For limitations, see Except Limitations.

    #### Parameters

    <ul>
      <li>
        request: [CreateUnionRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateUnionResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateUnionResponse.md)>

    Promise\<Types.CreateUnionResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:7435](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L7435)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.