Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the five characteristics of good data?

869


Describe in brief databases and sql server databases architecture.

944


What is xml datatype?

1035


What are the disadvantages of using the stored procedures?

1019


What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?

135


What are distinctive joins find as a part of sql?

912


Can you type more than one query in the query editor screen at the same time?

955


How much space does sql server 2016 take?

909


What is exporting and importing utility?

1018


How to optimize stored procedures in sql server?

1125


What is role playing dimension with two examples? : sql server analysis services, ssas

954


What are the different Topologies in which Replication can be configured?

1120


what is difference between NULL and ISNULL in SQL Server 2008?

967


How to drop existing indexes in ms sql server?

1015


Difference between uniqe index and uniqe constraint?

918