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

can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

951


Mention what is the function that is used to transfer a pl/sql table log to a database table?

943


How many commands are in sql?

1013


what is the difference between where clause and having clause? : Sql dba

960


what is single byte over head in oracle..?

2355


Is sql between inclusive?

1073


What is secondary key?

890


name 3 ways to get an accurate count of the number of records in a table? : Sql dba

1011


What mean sql?

956


explain the delete statements in sql

990


What is a constraint? Tell me about its various levels.

1094


What is sql in java?

1035


Define the select into statement.

1001


What is transaction control language (tcl)?

1083


What is trigger explain it?

970