Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 can you list all the table constraints in a database?

887


Explain the purpose of indexes?

902


What are the types of database recovery models?

1057


When should you use an instead of trigger?

922


What is a dataset and what are the different types of datasets?

125


What is openrowset sql server?

1065


How to insert a new row into a table with "insert into" statements in ms sql server?

915


What are the different authentication modes in sql server? How can it be changed?

1026


How to write a query with a left outer join in ms sql server?

929


What is a non-clustered index?

954


How to bind a view to the schema of the underlying tables?

948


Write a query for primary key constraint with identity key word?

976


How to get a list of all tables with "sys.tables" view in ms sql server?

984


What is replace and stuff function in sql server?

999


How do I find information about the install locations for the various instances running on a computer?

1033