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

create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration

939


How to see the event list of an existing trigger using sys.trigger_events?

1057


What is merge?

989


What is application role in sql server database security? : sql server security

1038


What are different types of schemas?

925


How to backup encryption key ?

180


What is tempdb in sql server?

949


What is the difference between the 2 operating modes of database mirroring?

1090


What happens when the SQL Azure database reaches Max Size?

111


How can we call UDF(User Define Function) using C# code in ASP.net ?

6862


Is foreign key unique?

985


How to create new table with "create table" statements?

1066


How to store and query spatial data?

976


What are the different types of cursor?

1071


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

1010