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
What are the types of joins in sql?
How to remove duplicate rows from table except one?
What is dirty read?
What is an expression in ms sql server?
What is table-valued sub query?
How to convert a table data in XML format in sql server?
What is stored procedures?
What do mean by xml datatype?
Explain about service Broker functions?
Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?
What is a with(nolock)?
what are the core components of SSRS?
How to return the second 5 rows in ms sql server?
How to modify the underlying query of an existing view?
Do you know what is blocking?