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
What extended events?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
What is the difference between dataadapter and datareader?
how many no of arguments can be passed in procedures and functions
what is the system function to get the current user's user id? : Sql server database administration
Differentiate between delete and truncate.
Where sql server user names and passwords are stored in sql server? : sql server database administration
Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
Explain about sql server login?
When multiple after triggers are attached to sql table, how to control the order of execution?
What is user-defined functions? What are the types of user-defined functions that can be created?
Define candidate key, alternate key, and composite key.
When is update_statistics command used?
What is clustered index
How to find which stored procedure is currently running in sql server?