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

select*from emp where empname in ('A','B') order by empname

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When a primary key constraint is included in a table, what other constraints does this imply?

965


What is xml datatype?

1061


How to enable tcp/ip protocol on a sql server?

1140


What is a view in sql?

958


Explain contrast amongst grouped and non-bunched records?

1005


Can a table have 2 primary keys?

967


What are different types of views?

930


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

947


What is temporary table in sql server? Why we use temp table?

931


What is the current pricing model of SQL Azure?

104


Can an automatic recovery be initiated by a user?

969


How many types of attribute relationships are there? : sql server analysis services, ssas

1048


What is exporting and importing utility?

1056


What is report rendering ?

155


What is the difference between Normalization and De-normalization?

1069