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 ?
Answers were Sorted based on User's Feedback
Answer / prashant
SELECT DISTINCT empname,dnname,dno,salary into New Table
|Is This Answer Correct ?||3 Yes||2 No|
Answer / b.kumar
SELECT *, ROW_NUMBER() OVER (PARTITION BY SAL ORDER BY SAL) AS ROWID
) SELECT * INTO EMP10 FROM CTE WHERE ROWID=1
|Is This Answer Correct ?||1 Yes||0 No|
Name three of the features managed by the surface area configuration tool? : sql server security
What is the Difference beween sql server 2005 and sql server 2008
What are the types of backup and tell me the difference between full and differential backup?
How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?
select empid empname from employee What is the result for the about query?
What is the difference between UNIQUE and DISTINCT keywords in DBMS?
hi. suppose one person goal is strong knowledge on SQL.... suggest me ...if he learns SQL SERVER or ORACLE? which is best?
Explain the database you used in your final year project?
2) Consider a Table name A which has below records ID --- 5 5 5 5 5 Consider another table B which has below records ID -- 5 5 5 5 5 5 5 5 How many rows will be returned by each of the below queries a) select * from A inner join B on A.id = b.ID b) select * from A left join B on A.id = b.ID c) select * from A right join B on A.id = b.ID
What is stored in the mssqlsystemresource database? : sql server database administration
what number files will a information contain in SQL Server? How many forms of information files exist in SQL Server? How many of those files can exist for a single database?
how to implement locking in sql server