Answer the question
In order to leave comments, you need to log in
How to ensure the uniqueness of the data in the table?
Good afternoon!
I create a table:
CREATE TABLE dic
( dic_id BIGINT NOT NULL IDENTITY,
dic_value VARCHAR(MAX) NOT NULL )
CREATE UNIQUE INDEX PK_dic_id ON dic (dic_id) INCLUDE (dic_value)
GO
But, contrary to logic, there are many duplicates (not unique values) in the dic_value column ).
What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
CREATE UNIQUE INDEX PK_dic_id ON dic (dic_id) INCLUDE (dic_value)
CREATE UNIQUE INDEX IX_dic_value ON dic (dic_value)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question