I making table “clients” and thing I can’t understand.
How to add constraint unique values only for “client_id”?
Here’s my query:
CREATE TABLE clients
(
client_id UInt16 NOT NULL,
second_name String,
first_name String,
patronymic String,
phone_number String,
email String,
discount Float32,
comment String,
PRIMARY KEY (client_id)
)
ENGINE = MergeTree
ORDER BY client_id
SETTINGS index_granularity = 8192;