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
How sql server executes a statement with nested subqueries?
what is an extended stored procedure? : Sql server database administration
Explain what are the restrictions while creating batches in sql server?
What are the differences between ms sql server & oracle?
What are the key configuration files for sql server reporting services ?
Do you know the different ddl commands in sql?
How to make conditional sum in ssrs?
What is the difference between functions and stored procedures?
How to find Duplicate Records In table?
What is the difference between lock, block and deadlock? : sql server database administration
Why use “nolock” in sql server?
What is the main purpose of having conversation group?
How do I create a trace in sql server?
What is the difference between nvl and nvl2?
How can I check if a view exists in a sql server database?