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 / murtaza

select empname,salary from A
where empname IN ('A','B');

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How sql server executes a statement with nested subqueries?

605


what is an extended stored procedure? : Sql server database administration

598


Explain what are the restrictions while creating batches in sql server?

700


What are the differences between ms sql server & oracle?

635


What are the key configuration files for sql server reporting services ?

128






Do you know the different ddl commands in sql?

670


How to make conditional sum in ssrs?

140


What is the difference between functions and stored procedures?

701


How to find Duplicate Records In table?

666


What is the difference between lock, block and deadlock? : sql server database administration

668


Why use “nolock” in sql server?

644


What is the main purpose of having conversation group?

577


How do I create a trace in sql server?

604


What is the difference between nvl and nvl2?

629


How can I check if a view exists in a sql server database?

654