how to delete duplicate rows from a specified table(only
single table)
how do you know which join is need to be used
Answer Posted / arif jameel
First add an Identity Column in table
Alter table <tblname>
Add < New_columnID > int identity(1,1)
Delete from <tblname> where < New_columnID> in
(select max(New_columnID)from <tblname>
Group by <tbl_columnname>
having count (<tbl_columnname>)>1)
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain architecture of sql server notification services?
what is collation? : Sql dba
What is the importance of sqlcode and sqlerrm?
What is trigger explain it?
What is a database trigger?
what are all different types of collation sensitivity? : Sql dba
What is the main reason behind using an index?
What is self-join and what is the requirement of self-join?
how to drop an existing view in mysql? : Sql dba
What is the file extension for sql database?
what is the difference between truncate and delete statement? : Transact sql
how can we destroy the session, how can we unset the variable of a session? : Sql dba
what is a field in a database ? : Sql dba
Can we create table in function?
Does a primary key have to be a number?