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...

write a query to delete similar records in same table

Answer Posted / umadevi

--deletes records within table without changing table name
delete from temp t1 where rowid<(select max(rowid) from temp
t2 where t1.empno=t2.empno) order by empno;

or
--create new table n insert records.
create table t1 as select distinct * from temp;

or
(truncate table)
truncate table t1;
insert into t1 select distinct * from temp;

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the file extension accdb stand for?

919


How do you update a sql procedure?

974


What is mutating error?

911


Why we use stored procedure instead of query?

953


What is an inconsistent dependency?

981


How do I sort a table in sql?

983


what are the advantages and disadvantages of cascading style sheets? : Sql dba

1007


What is cartesian join in sql?

1030


what is oltp (online transaction processing)? : Sql dba

1016


What is sqlcontext?

991


What has stored procedures in sql and how we can use it?

1018


What is the starting oracle error number? What is meant by forward declaration in functions?

940


Is sql similar to python?

919


What is cursor in pl sql with examples?

954


Can we use join in subquery?

1023