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
What is “asynchronous” communication in sql server service broker?
Explain different types of self contained sub query?
What is an execution plan? How would you view the execution plan?
What is clr ddl trigger?
What do you understand by recursive stored procedure?
What is the usage of the sign function?
What is a field name?
please differentiate between delete and truncate?
How many categories of functions based their return modes?
What is a cache in ssrs?
How to create median function?
What is a partitioned view?
Explain partitioned view?
What is difference between after and before?
How to download and install microsoft .net framework version 2.0?