write a query to remove duplicate records without using primary key column?
Answers were Sorted based on User's Feedback
Answer / mathanrathinam
delete tmp from(select col1,col2,row_number over(partition by col1,col2 order by col1,col2) rownum from tablename) tmp
where rownum >1
| Is This Answer Correct ? | 7 Yes | 8 No |
How do I create a partition table in sql server?
What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?
What is collation sensitivity?
What is similarity and difference between truncate and delete in sql?
What are the types of model in sql server and explain
What is raid, and how it can influence database performance?
What is difference between views and stored procedures?
How to provide default values to stored procedure parameters?
How to enter binary string literals in ms sql server?
What is a bit datatype?
What are defaults? Is there a column to which a default can't be bound?
Why people hate cursor?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)