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 / sivadasan

Sorry for the previous answer....

We can do like this ,

1. First we have to transfer all data from original_table
table to a temporary table .

create table Temp_table as select * from original_table;

2. Delete all record from Original Table....

delete original_table;

3. Now we can write a query by using INSERT and UNION

insert into original_table (select * from temp_table
UNION select * from temp_table);

any issues let me know.....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is count * in sql?

937


How is sql used in oracle?

971


What is an emotional trigger?

933


what is a field in a database ? : Sql dba

991


What are crud methods?

971


How do sql databases work?

947


Is natural join and inner join same?

855


What does pl sql developer do?

883


How to display the current date in sql?

1011


What does select count (*) mean in sql?

964


Mention what problem one might face while writing log information to a data-base table in pl/sql?

1161


How do I view a procedure in sql?

913


What is information schema in sql?

1017


Can a primary key be a foreign key?

971


How do I partition in sql?

905