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
from emp
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / b.kumar
WITH CTE
AS
(
SELECT *, ROW_NUMBER() OVER (PARTITION BY SAL ORDER BY SAL) AS ROWID
FROM EMP7
) SELECT * INTO EMP10 FROM CTE WHERE ROWID=1
Is This Answer Correct ? | 1 Yes | 0 No |
Explain subquery and state its properties?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
Do you know what is normalization of database? What are its benefits?
Why use cursor in sql server?
Write a sql query to delete duplicate records from a table called table1
how to delete duplicate rows in sql server2005
7 Answers Cisco, CTS, HCL, IBM,
What is key attribute?
How to start sql server browser service?
What the class forname () does?
What is catalog views?
What is standby servers? Explain types of standby servers.
Explain in brief how sql server enhances scalability of the database system?