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

How to pronounce postgresql?

1096


Explain the working of primary key?

1152


What are the different schemas objects that can be created using pl/sql?

1082


how to enter binary numbers in sql statements? : Sql dba

1011


Does sql view stored data?

1003


how to write date and time literals? : Sql dba

1010


What plvcmt and plvrb does in pl/sql?

1366


What does select * from mean in sql?

3330


Does sql between include endpoints?

1060


what does the t-sql command ident_current does? : Transact sql

1046


What is execution plan in sql?

1092


Why triggers are used?

1037


How do you write an inner join query?

993


what are the performance and scalability characteristics of mysql? : Sql dba

1032


Explain isolation levels. : Transact sql

1105