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
Explain error and transaction handling in sql server?
What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?
What happens if date-only values are provided as date and time literals?
How do you know if sql server is running on your local system?
mention different types of relationships in the dbms?
How to include text values in sql statements?
Can binary strings be converted into numeric or float data types?
Tell me what do we need queues in sql service broker?
What is a join in sql?
What is best institute to Learn DotNET And SQL in chennai?
What is the stuff and how does it differ from the replace function?
Define msdb database?
Why transaction is important?
Which tcl commands are available on the sql server?
What is resource governor in sql server?