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 / inderpal

Select empname, salary from A order by empname

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find the sql server instance name?

620


Can we deploy SSRS reports on our personal website?

132


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5586


What happens when the SQL Azure database reaches Max Size?

96


How do we synchronize On-Premise SQL server with SQL Azure?

106






Does dbcc checkdb requires db to be in single_user mode? : sql server database administration

604


what are acid properties? : Sql server database administration

573


What is the advantage of sql server?

628


What is filtered index?

731


How do I perform an unattended install of sql server 2000?

674


What is format parameter in ssrs?

117


What are the pre-defined functions in the sql server?

608


Explain what are the restrictions while creating batches in sql server?

700


Explain nested trigger in sql?

667


Can a database be shrunk with users active?

697