Answer Posted / ramaniranjan das
select top1 * from (select distinct top nth from table name
by column name ) alisa name of table order by column name
Example:-Create table tab_employee
(
Emp_id int,
Emp_name varchar(50),
Emp_salary money,
Emp_deg varchar(30),
emp_add varchar(100)
);
INSERT INTO tab_employee
VALUES ('1001','ANIL','18000','MANAGER','hyd')
Go
INSERT INTO tab_employee
VALUES ('1002','AKIL','6000','CLERK','Mub')
Go
INSERT INTO tab_employee
VALUES ('1003','VINOD','7000','SALESMAN','Bang' )
GO
INSERT INTO tab_employee
VALUES ('1004','VIKAS','8000','SALESMAN','BBSR' )
GO
INSERT INTO tab_employee
VALUES ('1005','SUNIL','15000','MANAGER','Orissa' )
select top 1 * from tab_employee where Emp_salary not in
(Select Distinct top 3 Emp_salary from tab_employee order
by Emp_salary Desc)order by Emp_salary Desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to load data from external tables to regular tables?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
How to call a stored function with parameters?
What is a read write transaction in oracle?
What are the database administrators utilities available?
What is set operator oracle?
Explain an index?
What exactly do quotation marks around the table name do?
What are a collation and state the different types of collation sensitivity?
How to create additional tablespaces for an new database?
How to define an anonymous block?
Explain an integrity constrains?
Explain table?
What is tns name?
Why packages are used in oracle?