I have a table emp , Fields with empname,dnname,dno,salary.
now I want copy distinct salary with all emp detail from emp into new table which is not already exist in database. how would I do this ?

Answer Posted / prashant

SELECT DISTINCT empname,dnname,dno,salary into New Table
from emp

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?

134


How to use wildcard characters in like operations in ms sql server?

586


What is SQL Server?

656


Explain why variables called the most powerful component of ssis?

521


how you can list all the tables in a database?

516






What are the advantages of passing name-value pairs as parameters?

649


What is mean by dml?

527


How can we solve concurrency problems?

557


It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

545


Tell me the phases a transaction has to undergo?

537


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

573


What is the simplest way to create a new database in ms sql server?

523


Can we use max in where clause?

502


We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?

895


What is ssrs?

95