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

I think simply we can do like the following..

1. First we have to transfer all data from a table to
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

If any issue let me know....

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

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of triggers in sql?

1036


What is db journal file?

987


What is string join?

952


What language is oracle sql developer?

962


What is field delimiter?

1004


Why we use join in sql?

927


Explain the the update statement in sql?

1002


What is sql rowcount?

964


What are the different sql commands?

1022


What is flag in sql?

999


How show all rows in sql?

984


What is a primary key? Explain

934


Can we call dml statement in function?

994


explain the delete statements in sql

998


What is sql basics?

1006