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

Explain transaction server auto commit?

1044


What is cube dimension? : sql server analysis services, ssas

1014


What number aggregate functions are accessible there in sql?

1077


What is merge?

1023


tell me the disaster recovery plan

2516


What will be the maximum number of index per table?

1012


Do you know what is normalization of database? What are its benefits?

1127


What is the sql case statement used for?

1104


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

932


What is a transact-sql statement?

1067


in a table is b in column k (manikanta,sivananda,muralidhar) i want result like (mnikanta,sivnanda,murlidhar) please slove it

1514


What does REVERT do in SQL Server 2005?

968


What is the difference between deallocate cursor and close cursor?

1265


What is apply operator in sql?

1016


How to optimize stored procedures in sql server?

1188