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 are the five characteristics of good data?
Describe in brief databases and sql server databases architecture.
What is xml datatype?
What are the disadvantages of using the stored procedures?
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
What are distinctive joins find as a part of sql?
Can you type more than one query in the query editor screen at the same time?
How much space does sql server 2016 take?
What is exporting and importing utility?
How to optimize stored procedures in sql server?
What is role playing dimension with two examples? : sql server analysis services, ssas
What are the different Topologies in which Replication can be configured?
what is difference between NULL and ISNULL in SQL Server 2008?
How to drop existing indexes in ms sql server?
Difference between uniqe index and uniqe constraint?