how to delete duplicate rows from table in sql server
Answer Posted / gerry
delete from my_table where my_primary_key in
(select a.primary_key from my_table a, my_table b
where not a.my_primary_key = b.my_primary_key
and [insert restriction that makes the 2 rows the same]
)
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Where is trigger in sql server?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
Name the different type of indexes in sql?
What do mean by xml datatype?
Why do we need different type of parameter?
How to identify current user in ssrs report?
What is policy based management (pbm)? : sql server database administration
What is standby servers? Explain types of standby servers.
How fixed length strings are truncated and padded?
How to stop log file growing too big?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
What is data compression?
Why use “pivot” in sql server?
List some case manipulation functions in sql?
What is dbcc? Give few examples.