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

Can you use order by when defining a view?

0 Answers  


Differentiate between sql temp table vs table variable?

0 Answers  


How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?

0 Answers   MCN Solutions,


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

0 Answers  


Difference between Inner vs outer joins?

0 Answers  


What are the types of table?

0 Answers  


Please explain what is “asynchronous” communication in sql server service broker?

0 Answers  


What samples and sample databases are provided by microsoft?

0 Answers  


UPDATE statement can on a single table or on the multiple table?

7 Answers   iGate, TCS,


What is the need for group functions in sql?

0 Answers  


1 01 101 01010

0 Answers  


What are ddl (data definition language) statements for tables in ms sql server?

0 Answers  


Categories