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...

how to copy only distinct data into another table which is not already exist in database?

Answer Posted / karthik soundararajan

TableA -- Existing Table

ID
5
5
5
5
5

Solution : SELECT DISTINCT ID INTO TableB FROM TableA

It create a table called TableB and insert only one record as shown below:

ID
5

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the ways to controlling cursor behavior?

872


What is collation sensitivity? Explain different types.

962


What is database mirroring?

1038


Is it possible to update the views? If yes, how, if not, why?

969


Why union all is faster than union?

865


What is the difference between Stored Procedures and triggers?

1034


Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

1021


What is the difference between a clustered index and a non-clustered index?

924


Tell me what is sql profiler?

979


What is the difference between truncate and delete commands?

1002


How ssrs maintain security?

1016


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

1011


What are horizontal and vertical scaling?

170


Define msdb database?

973


List the different normalization forms?

928