how to copy only distinct data into another table which is not already exist in database?
Answers were Sorted based on User's Feedback
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 |
SELECT DISTINCT * INTO TABLE_NEW FROM TABLE_EXISTING
Is This Answer Correct ? | 1 Yes | 0 No |
How can i give the restrictions for the data entry, if i wish to enter only I ,II, III, IV in the grade actegory of student table?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
What are dml (data manipulation language) statements in ms sql server?
Explain nested join?
What is trace flag in sql server?
what is meant by sql injection with example and one more question how to catch the errors in sqlserver
How do I schedule a sql server profiler trace?
What is a covering index?
Is it possible to update the views? If yes, how, if not, why?
What is the difference between dropping a database and taking a database offline?
Is it possible to create a stored procedure that runs a query and outputs the results to a text file and allows me to add extra delimeters and static field info. If so How?
What is the size of transaction log file?