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

How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

0 Answers  


What authentication modes does sql server support?

0 Answers  


Questions on identity?

2 Answers   Infosys,


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

0 Answers  


Explain the various types of concurrency problem?

0 Answers  


What are the underflow and overflow behaviors on float literals?

0 Answers  


What types of replication are supported in sql server?

0 Answers  


How to Execute an Operating System Command From Within SQL Server ?

3 Answers  


What does nvl stand for?

0 Answers  


explain databases and sql server databases architecture? : Sql server database administration

0 Answers  


How do I start and stop sql server?

0 Answers  


What is difference between standardization and normalization?

0 Answers  


Categories