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 error and transaction handling in sql server?

1063


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

1078


What happens if date-only values are provided as date and time literals?

1078


How do you know if sql server is running on your local system?

1098


mention different types of relationships in the dbms?

1089


How to include text values in sql statements?

1098


Can binary strings be converted into numeric or float data types?

1098


Tell me what do we need queues in sql service broker?

1052


What is a join in sql?

1155


What is best institute to Learn DotNET And SQL in chennai?

2219


What is the stuff and how does it differ from the replace function?

1227


Define msdb database?

1077


Why transaction is important?

1021


Which tcl commands are available on the sql server?

1141


What is resource governor in sql server?

1049