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 / zaheer abbas

select empname ,salary
from A

where salary <= 2000
order by empname

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a non clustered primary key?

899


How are the unique and primary key constraints different?

1045


What are the different ways you can create databases in sql server?

1079


What it means to be triggered?

961


What are Spatial data types in SQL Server 2008

999


what is the sql equivaent of the dataset relation object ?

1997


What are the different sql server versions?

962


How do I clean up sql server transaction log?

1045


Can one drop a column from a table?

1001


Why I am getting this error when renaming a database in ms sql server?

1029


Define indexes?

1027


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

913


What is difference between views and stored procedures?

959


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

966


Differentiate between truncate vs delete in mssql?

1056