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
Explain transaction server auto commit?
What is cube dimension? : sql server analysis services, ssas
What number aggregate functions are accessible there in sql?
What is merge?
tell me the disaster recovery plan
What will be the maximum number of index per table?
Do you know what is normalization of database? What are its benefits?
What is the sql case statement used for?
Write an sql query to sort a table according to the amounts in a row and find the second largest amount.
What is a transact-sql statement?
in a table is b in column k (manikanta,sivananda,muralidhar) i want result like (mnikanta,sivnanda,murlidhar) please slove it
What does REVERT do in SQL Server 2005?
What is the difference between deallocate cursor and close cursor?
What is apply operator in sql?
How to optimize stored procedures in sql server?