8

How does one create a table in Presto with one of the columns having an Array datatype?

For example:

CREATE TABLE IF NOT EXISTS (ID BIGINT, ARRAY_COL ARRAY)...

1 Answers1

8

Edit

The syntax for array type is array(element_type), like this:

create table memory.default.t (a array(varchar));

Original answer

The syntax for array type is array<element_type>, like this:

create table memory.default.t (a array<varchar>);

Note: the connector in which you create the table must support the array data type and not every connector supports it.

Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82