none
SQLCE error while trying to insert a record RRS feed

  • Question

  • tried to use the following sql

    INSERT INTO [DeptItems]
      ([Description]
      ,[Department])
     VALUES
      ('10 20s 100 box'
      ,20)

    Get an error "A duplicate value cannot be inserted into a unique index. [ Table name = DeptItems, Constraint name = PK_DeptItems ]"

    I did notice that all the other tables had PKs that were like PK_TableName_00000000000000000215 whereas this one is just PK_DeptItems. 

    Why am I getting this error?

    TIA

    Harry

    Tuesday, November 26, 2019 7:07 PM

Answers