A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/functions/array_cat below:

ARRAY_CAT | Snowflake Documentation

Reference Function and stored procedure reference Semi-structured and structured data ARRAY_CAT
Categories:

Semi-structured and structured data functions (Array/Object)

ARRAY_CAT

Returns a concatenation of two arrays.

Syntax
ARRAY_CAT( <array1> , <array2> )

Copy

Arguments
array1

The source array.

array2

The array to be appended to array1.

Returns

An ARRAY containing the elements from array2 appended after the elements of array1.

Usage notes Examples

This example shows how to use ARRAY_CAT():

Create a simple table and data:

CREATE TABLE array_demo (ID INTEGER, array1 ARRAY, array2 ARRAY);

Copy

INSERT INTO array_demo (ID, array1, array2) 
    SELECT 1, ARRAY_CONSTRUCT(1, 2), ARRAY_CONSTRUCT(3, 4);

Copy

Execute the query:

SELECT ARRAY_CAT(array1, array2) FROM array_demo;
+---------------------------+
| ARRAY_CAT(ARRAY1, ARRAY2) |
|---------------------------|
| [                         |
|   1,                      |
|   2,                      |
|   3,                      |
|   4                       |
| ]                         |
+---------------------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4