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
When a primary key constraint is included in a table, what other constraints does this imply?
What is xml datatype?
How to enable tcp/ip protocol on a sql server?
What is a view in sql?
Explain contrast amongst grouped and non-bunched records?
Can a table have 2 primary keys?
What are different types of views?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
What is temporary table in sql server? Why we use temp table?
What is the current pricing model of SQL Azure?
Can an automatic recovery be initiated by a user?
How many types of attribute relationships are there? : sql server analysis services, ssas
What is exporting and importing utility?
What is report rendering ?
What is the difference between Normalization and De-normalization?