var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Deleting duplicate records
I am having one table named MyTable and this table contains only one column MyCol. Now i m having 10 records in it and all the records are duplicate ie value is 7 for all 10 records.
It is something like this,
Now i m trying to delete 10th record or any record then it gives me error
"Key column information is insufficient or incorrect. Too many rows were affected by update."
What should i do if i want only 4 records insted 10 records in my table?
How do i delete the 6 records from table?
Plz help me.
Since there seems to be no (primary) key to identity the row there's nothing left than a workaround, which basically will delete all rows with, in this case, mycol on 7, and inserts four (your case) new records with the value 7.
this could work for you:
set rowcount 4
delete from table_name
set rowcount 0 --set back to affect all rows
you can also temporary add one identity column and delete all the record that you dont need. After finish drop the new added identity column.