Home > database >  How do you define a primary key on a table in Trino?
How do you define a primary key on a table in Trino?

Time:11-11

The query below does not work.

CREATE TABLE test_table (date varchar, id varchar, PRIMARY KEY (date,id)) 

I can't seem to find any docs on primary keys in Trino.

CodePudding user response:

You don't. As description says:

Trino is a distributed SQL query engine designed to query large data sets distributed over one or more heterogeneous data sources.

Trino does not maintain primary keys, indexes and so on. See also use cases and Trino concepts.

  • Related