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 to view existing indexes on an given table using sys.indexes?

800


Equi join and non equi join is possible with sql server?

661


What is the purpose of indexing?

785


Give me a SQL Query to find out the second largest company?

918


plss anybody specify tha constrian management system in dbms

1800






How will you decide the active and passive nodes?

787


What is the difference between clustered index and primary key?

677


How to fetch the next row from a cursor with a "fetch" statement?

790


What is the report model project?

122


What is usually the first word in a sql query?

812


Can we use custom code in ssrs?

776


Can a database be shrunk to 0 bytes, if not, why?

803


What is inline table-value user-defined function?

772


What does the on delete cascade option do?

744


Do comments need to go in a special place in sql server 2005?

648