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

Explain “row_number()” in sql server with an example?

532


Explain system scalar functions?

594


What are the different types of locks in the database?

492


Show Practically Sql Server Views are updatable?

601


How to create a user name in a database?

601






What is the purpose of a table?

536


How to view existing indexes on an given table using sp_help?

605


What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

2322


How much is a sql server license?

515


System requirements for sql server 2005 express edition?

577


What happens if you are trying to access a schema not owned by you?

520


Do you know the cursor types?

626


What are the limitations in ssrs on sql server express edition?

139


If the job running very slow what is the action you do

1434


What happens on checkpoint?

624