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 is the command used to fetch first 5 characters of the string?

1336


what are the difference between clustered and a non-clustered index? : Sql dba

979


What is mdf ldf and ndf?

932


What's the difference between a primary key and a clustered index?

947


Describe types of sql statements?

994


What is equi join in sql?

1010


how to rename an existing table in mysql? : Sql dba

1007


What do you know by pl/sql cursors?

1038


What is the difference between delete and truncate commands?

979


what is the syntax used for partition in tsql? : Transact sql

960


How do you go back in sql?

942


Does asenumerable execute the query?

987


Where not exists in sql?

913


How do you select unique values in sql?

938


What is the difference between distinct and unique in sql?

876