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

Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

730


Write the SQL query to drop, truncate and delete table.

726


Can you edit the .rdl code associated with a linked report?

121


Can sql servers linked to other servers like oracle?

694


Difference between connected and disconnected database in .net with sql server?

771






What is the distinction amongst delete and truncate?

737


Why do we use non clustered index?

734


what is a self join? : Sql server database administration

693


Define constraints and give an example of their use?

740


How can i Relate Tables in SSIS

806


What are different types of roles provided by ssrs?

128


Does windows server 2016 come with sql server?

677


What is an inner join?

708


What do mean by xml datatype?

770


What is surrogate key? : sql server analysis services, ssas

865