I am trying to delete a row in sql server management studio 2012
but an error appears:
sql error
No rows were deleted
A problem occurred attempting to delete row 2 Error Source: Microsoft.SqlServer.Management.DataTools Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows)
Is there a way to fix error that without typing any query?
This is the basic syntax for using the DELETE query: DELETE FROM table_name WHERE condition of which row(s) to delete; If you want to delete one row from the table, then you have to specify a condition.
The reason SQL won't let you drop a table in this situation is because the allocation pages/extent chain appears to be damaged or cross-linked in some way. So SQL Server thinks that there is actually data from other tables in pages/extents belonging to the problem object.
Thanks @Hani
I had the same problem (actually a table with a Unique ID, but with some rows accidentally duplicated including the "unique ID" so I couldn't delete the duplicate rows), and your advise helped me solved it from the SQL Server Management GUI.
SELECT TOP(200)...
{snip my criteria created by filter}
to instead read:
SELECT TOP(1)...
{snip my criteria created by filter}
Thanks for the help, this proved to be the perfect blend of GUI and SQL code for me to get the job done safely and efficiently.
i hope this helps others in a similar situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With