Home > database >  6.5 work table in the database SQL ID repair tools
6.5 work table in the database SQL ID repair tools

Time:10-04

I used to use PB4 made up a program, the background is SQL6, 5 the following message:
SQLSTATE=23000,
[Microsoft] [ODBC SQL Server Driver] [SQL Server] Violation of PRIMARY KEY constraint 'PK__crkd1__id__7C8480AE: Attempt to insert the duplicate KEY in object' crkd1.

No changes made to the database.

INSERT INTO ck3_design. Crkd1 (ck_id, informs, ck_date CKRD, department, wgroup, finish, finish_man, sh, sh_man, jz, jz_man, ZGHJ, zghj_man, end_jn, end_j, writer, attention) VALUES (?,?,?,?,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? ,? )

The query is ID repeat, it is said that there are special ID repair tools, hope to get your help

CodePudding user response:

Dizzy, ID repeat, let you change the primary key, add a few more fields

CodePudding user response:

Repetition is the master key, use tools should not solve this problem
Or look at the program, find out the problem

CodePudding user response:

That you insert time to determine whether there is a duplicate id if you have change a id into not to go,
  • Related