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 is perspective, have you ever created perspective? : sql server analysis services, ssas
What is the use of attributehierarchyvisible ? : sql server analysis services, ssas
How to get @@error and @@rowcount at the same time?
What are the differences between union, intersect, and minus operators?
What are the restrictions applicable while creating views? : SQL Server Architecture
How can we use ConnectorJ JDBC Driver with MS SQL?
How to make a column nullable?
How to use subqueries with the in operators in ms sql server?
Why use triggers?
Difference between Inner vs outer joins?
What is the process of normalization?
What is indexed view? How to create it?
in the physical file layout, where should the transaction log be stored in relation to the data file?
What are the encryption mechanisms in sql server?
How to throw custom exception in Stored Procedure?