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
Is it possible to call a stored procedure within a stored procedure?
how can you attach more than 20 ldf files in sql server
Where in ms sql server is ’100’ equal to ‘0’?
What is difference between oltp and olap?
What is difference between materialized view and view?
Explain full-text query in sql server?
How to get a list of columns in a view using "sys.columns" in ms sql server?
What are the High-Availability solutions in SQL Server and differentiate them briefly?
What is primary key index?
Can we call stored procedure in view in sql server?
How dts is used to extract, transform and consolidate data?
How can you check the version of sql server?
How to name query output columns in ms sql server?
How to query multiple tables jointly?
What is report rendering ?