Hi,
I have a table A which has four rows as follows
Table A
-------
empname salary
------- ------
A 1000
B 2000
C 3000
A 1000
B 2000
D 5000
I need the following output:
empname salary
------- ------
A 1000
A 1000
B 2000
B 2000
Thanks in advance
Answer Posted / goutam dey
select empname,salary from tableA
groupby empname
having count(empname)>1
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
Is it possible to create trigger on views?
What is nonclustered index on computed columns?
Differentiate sql server reporting services vs. Crystal reports?
What are types of subqueries?
how to invoke a trigger on demand? : Sql server database administration
What are a scheduled jobs or what is a scheduled tasks?
Explain index in sql server?
What is in place upgrade in sql server?
What do you understand by triggers?
How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?
What is mean by candidate key?
How do clustered indexes store data?
What is 5nf in normalization form?
How do you identify a foreign key?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do