Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Find employee with third salary

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-03-19 : 08:28:19
suraj writes "Question: Find the employee with the third largest salary in the
organization.

CREATE TABLE Employees
( empid int,
ename varchar(50),
salary int
);

insert into Employee values (1, 'emp1', 1000);
insert into Employee values (2, 'emp2', 1001);
insert into Employee values (3, 'emp3', 1002);
insert into Employee values (4, 'emp4', 1003);
insert into Employee values (5, 'emp5', 1000);
insert into Employee values (6, 'emp6', 1001);
insert into Employee values (7, 'emp7', 1003);


Thanks
Suraj"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-03-19 : 08:29:08
We don't answer homework or exam questions on SQL Team. You won't learn anything that way. I'd suggest looking in Books Online for "TOP", and also search SQL Team for "TOP".
Go to Top of Page
   

- Advertisement -