I would like to know how I would go about of creating my table or choosing an insert that make sure that I do not get duplicate values.
create table test.dbo.test
product,
time,
primary key(product, time)
go
When using Clustered ColumnStore I can not have any unique constraints to know that the data that has been inserted is unique. Is there another way to check this?
Here is a work-around that uses materialized views.