the row values updated or deleted either do not make the row unique or they alter multiple rows

前端 未结 3 1430
盖世英雄少女心
盖世英雄少女心 2021-02-05 02:36

I want to delete row and I get this error:

the row values updated or deleted either do not make the row unique or they alter multiple rows

相关标签:
3条回答
  • 2021-02-05 02:47

    This might be a bit late but it could help someone. I ran into the same issue today but Akshey's code didn't work for me. My database table didn't contain an ID column, so I added one in and set it's 'Identity Specification' to 'Yes'. I reloaded the table with this new column in it and then was able to delete whichever rows I wanted. Afterwards I deleted the ID column, reloaded and the table and everything was fine.

    0 讨论(0)
  • 2021-02-05 02:48

    There are duplicate rows in your table. When this is the case you cannot edit table using UI. first delete rows with matching data using SQL then try and edit. Delete rows with matching data one by one until you are left with one row. Use the following query for deleting matching rows where column IdSeminar has value 1 :

    Delete top(1) from tab where IdSeminar=1
    

    do the same with other matching rows.

    0 讨论(0)
  • 2021-02-05 02:52

    SQL Studio cautiously tries to delete exactly one row but finds no way to identify it. Contrary to what it's UI may tempt you to suppose, row can't be identified by it's position in the result set.

    0 讨论(0)
提交回复
热议问题