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 / rajkumar
select*from emp where empname in ('A','B') order by empname
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What are the difference between primary key and unique key? : sql server database administration
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
How to execute a stored procedure in ms sql server?
What is the purpose of linked server configuration in sql server?
Explain the steps to use transact-sql cursor?
How to create a simple table to test triggers in ms sql server?
Explain nested trigger in sql?
Why do you want to join software field as you have done your BE in Electronics?
How to set the current database in ms sql server?
What do you understand by integration services in sql server?
We need to perform what steps in the following order to work with a cursor?
What are the acid properties?
Why is there a performance difference between two similar queries where one uses union and the other uses union all?
What is data mart? : sql server analysis services, ssas
What is a select query statement in ms sql server?