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?

Answers were Sorted based on User's Feedback



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

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

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

Answer / sheshu4040

SELECT DISTINCT * INTO TABLE_NEW FROM TABLE_EXISTING

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Which Model uses the SET concept

0 Answers   Infosys,


What are the properties of the transaction?

0 Answers  


what is the main difference between after trigger and instead trigger.

2 Answers  


What are different types of views?

0 Answers  


What is a subquery in a select query statement in ms sql server?

0 Answers  


How will you go about resolving deadlocks?

0 Answers  


What is 2nf normalization?

0 Answers  


List out the differences between global and local temp tables in sql server?

0 Answers  


What is a result set object returned by odbc_exec()?

0 Answers  


What is a trace frag? Where do we use it?

0 Answers  


Explain the difference between primary keys and foreign keys?

0 Answers  


Can you get second highest salary from the table?

0 Answers   QuestPond,


Categories