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 command is used to create a database in the sql server and how?

1111


Write a query to include a constraint, to check whether the employee salary is greater than 5000?

1545


What is resource governor?

924


How many columns can exist together per table?

1097


How to generate create table script on an existing table in ms sql server?

1090


Can the query output be sorted by multiple columns in ms sql server?

932


What do you understand by recursive stored procedures?

937


What are triggers in ms sql server?

1096


What is an example of a foreign key?

922


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

981


Can a table have 2 primary keys?

930


System requirements for sql server 2005 express edition?

949


What is a virtual table in sql?

935


Can a database be shrunk to 0 bytes, if not, why?

1034


What are the acid properties?

934