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

What is the significance of master, tempdb and model databases?

0 Answers  


How do I change my passwords (database, LDAP, and so on) without causing an outage?

0 Answers   IBM,


hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail

0 Answers   IntraLogic, Oracle,


Mention a few common trace flags used with sql server?

0 Answers  


In one interview...interviewer ask me question pleas tell me sql server architecture.. can any body tell me the sql server architecture with digram

0 Answers  


What is shared lock?

0 Answers  


Explain unique key in sql server?

0 Answers  


Explain collation?

0 Answers  


how can u get last observation in an unknown dataset ?

0 Answers   Genpact,


what is advantages in sql 2005 over sql 2000?

4 Answers  


How to end a stored procedure properly in ms sql server?

0 Answers  


What is autocommit mode in sql server?

0 Answers  


Categories