Delete duplicate records from the table?(Table must have
unique id)
Answer Posted / kk
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY DuplicateColumn1, DuplicateColumn2, DuplicateColumn3)
Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
Can we write trigger for view?
what is a schema in sql server 2005? : Sql server database administration
List all types of constraints in sql server?
What are constraints?
What is primary key index?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?
Tell me about joins in database system and explain each in detail.
Create and insert into temp table in sql server?
Explain syntax for viewing trigger?
Is candidate a key?
How to remove duplicate rows from table?
How many full-text indexes can a table have?
What is inner join in sql server joins?
Difference between Sql server reporting services and Crystal reports?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.