Tagged Questions
6
votes
1answer
164 views
UNIQUE index key violation
I have a table with a PK and a unique non-clustered index, as follows:
CREATE TABLE Table1
(
Id INT IDENTITY(1,1) NOT NULL,
Field1 VARCHAR(25) NOT NULL,
Field2 VARCHAR(25) NULL,
...
4
votes
1answer
79 views
Unexpected Unique Constraint Violation
Given the following CREATE TABLE statement:
CREATE TABLE [dbo].[Unit]
(
[id] SMALLINT NOT NULL IDENTITY(1,1),
[name] VARCHAR(100) NOT NULL,
CONSTRAINT ...