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

Explain aggregate functions?

572


Explain what is raid and what are different types of raid levels?

541


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

544


What is difference between views and tables?

478


What is Federation Root Database?

90






hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.

2483


Define Business Edition in SQL Azure?

88


Define outer join?

546


Explain datetimeoffset data type in sal server 2008?

552


List some advantages and disadvantages of stored procedure?

582


What is a transact-sql statement?

545


How to make a remote connection in a database?

544


how do you determine the Load performance of any query in sql server {example how do u determine performance of a select stmnt which returns Dynamically many no of records ... some times 100,1000,10000 etc., }

1866


How does stuff differ from the replace function?

563


What is use of attribute hierarchy optimized state? : sql server analysis services, ssas

597