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
How many levels of sp nesting is possible?
Explain transaction server consistency?
Which tcl commands are available on the sql server?
Mention a few common trace flags used with sql server?
How you can get the list of largest tables in a database?
Why should we go for stored procedures? Why not direct queries?
Do you know the capabilities of cursors?
What does normalization do to data?
Write the SQL query to drop, truncate and delete table.
Tell me extended events in sql server 2008?
How to connect to a sql server using odbc_connect()?
what protocol both networks use? : Sql server database administration
what is difference between NULL and ISNULL in SQL Server 2008?
what is isolation level at dead lock?
How do I find the transaction log size in sql server?