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 differences between DDL, DML and DCL in SQL?
How will you make an attribute not process? : sql server analysis services, ssas
How to create a simple table to test triggers in ms sql server?
How check triggers in sql server?
What is difference between standardization and normalization?
How to list all user defined functions in the current database?
How to connect a database with sql express.?
What is RMS migrations?
SQL Server Architecture ?
How to get a list of columns in a view using the "sp_columns" stored procedure?
List out some of the requirements to set up a sql server failover cluster?
What is the exact numeric data type in sql?
What is plan freezing?
Explain differentiate between a having clause and a where clause?
How to define the name and server for a new dsn?