Search code examples
sql-serversql-server-2005rowid

SQL server 2005 :Updating one record from 2 identical records


I have 2 records in a table in SQL Server 2005 db which has exactly same data. I want to update one record.Is there anyway to do it?Unfortunately this table does not have an identity column and i cant use a direct update query because both will be updated since data is same.Is there anyway using rowid or something in SQL server 2005 ?


Solution

  • I would add an identity column to the table and then update on that identity column or update based on whatever the primary key of the table is that makes the row unique.