PRB: Deletion of rows with the same values behaves differently in SEM and Query Analyzer (268505)



The information in this article applies to:

  • Microsoft SQL Server 7.0
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q268505
SHILOH bug:39592
SQLBug_7.0: 39592

SYMPTOMS

When you try to delete a duplicate row by using the SQL Server Enterprise Manager (SEM), you receive the following error message:
Key column information is insufficient or incorrect. Too many rows were affected by update.
In the following table, for example, the error message appears if you attempt to delete one or both of the rows containing "abc" by using SQL Enterprise Manager with the following steps:
  1. Right-click on the table.
  2. Click on Open table, and then click on Return All Rows.
  3. Highlight the rows, and then press the Delete button.
Character_Column1Character_Column2
abcabc
abcabc
zxyzxy
fgtart

CAUSE

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

WORKAROUND

Use Query Analyzer, rather than Enterprise Manager, to delete duplicate values.

For example:
DELETE FROM table_test
WHERE Character_Column1 = 'abc'
				

MORE INFORMATION

For more information about deleting one of the duplicate values, click the following article number to view the article in the Microsoft Knowledge Base:

139444 How to remove duplicate rows from a table


Modification Type:MinorLast Reviewed:12/29/2005
Keywords:kbprb kbSQLProg KB268505 kbAudDeveloper