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 |
what's sql server? : Sql server database administration
What is the difference between dataadapter and datareader?
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.
What are constraints? Explain different types of constraints?
26 Answers Emsang, Kendriya Vidyalaya(Kvs), Polaris, Wipro,
I have cleared sbi clerk examination. I am Bachelor in computer application (BCA) graduate. so which type of question related bca in sbi clerk interviews. pls answers me at sejalvaghela@yahoo.co.in.. and also tell me which type of question asked in sbi clerk interview.
How we can compare two database data?
Can sql servers linked to other servers?
when you create a database how is it stored? : Sql server database administration
Explain the properties of a relational table?
How to install sql server 2005 express edition?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication