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
Can we save images in a database and if yes, how?
How many types of tables supported by oracle?
How can we find out the current date and time in oracle?
What is a oracle database?
What is oracle instant client?
How to resolve the ORA-39133 error in Oracle?
Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.
What is logical backup in oracle?
How to rename an index?
Is oracle the best database?
What is the max number of columns in an oracle table?
What do you mean by merge in oracle and how can we merge two tables?
What privilege is needed for a user to connect to oracle server?
How do we represent comments in oracle?
Explain drop constraint oracle?