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
How we can compare two database data?
Explain system views?
What does null mean?
What is partition in sql server?
What is DCL?
How to select all columns of all rows from a table with a select statement in ms sql server?
What are number line correlation administrators will use while working with a subquery?
What is the maximum size of column in sql server?
Equi join and non equi join is possible with sql server?
What is the maximum rows in sql server table?
optimization techinques
How adventureworkslt tables are related?
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
What is inner join? Explain with an example?
What do you understand by mirroring and mention the advantages of the mirroring?