How To delete duplicate record from a particular table?
Answer Posted / g2
create table Table1(trowid int not null, tname varchar(100))
insert into table1(trowid, tname) values(1, 'G2')
go 100
declare @row int;
set @row= (select count(*) from table1)
set @row=@row-1
set rowcount @row
delete from table1 -- You can put here conditions with all
the columns also
set rowcount 0
go
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is SubQuery in SQL Server 2008
Explain powershell included in sql server 2008?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
What are the rendering extensions of ssrs?
Tell me about normalization in DBMS.
What is query and its types?
What is a DBMS, query, SQL?
What is difference between Datepart() and Datename() in SqlServer?
How to find the service pack installed? : sql server database administration
Explain what are the restrictions that views have to follow? : SQL Server Architecture
Differentiate between ms sql server reporting services vs crystal reports?
Can sql servers linked to other servers?
What is a coalesce function?