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 a default tcp/ip socket assigned for sql server? : Sql server database administration
Differentiate between ms sql server reporting services vs crystal reports?
How to execute a sql statement using mssql_query()?
What are the recovery models for a database?
what is blocking? : Sql server database administration
What is the use of custom fields in report?
What is PROJECTION Operation?
List the different index configurations possible for a table?
Is t sql the same as sql server?
What is difference between unique and primary key?
Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?
What is ddl command?
What is the difference between drop table and truncate table?
What is blocking and how would you troubleshoot it? : sql server database administration
Explain rdbms?