1 Answer(s)      6 years and 6 months ago
Posted in : SQL
what is the query for retieving third highest salary table


View Answers

September 25, 2010 at 12:06 PM

Hi Friend,

In MySql, you can use the following queries:

1)select * from employee e1 where (3-1) = (select count(distinct (e2.salary)) from employee e2 where e2.salary>e1.salary)

2)select max(salary) from employee where salary <(select max(salary)from employee where salary<(select max(salary) from employee));

In Oracle, you can use the following query:

select max(salary) from employee where level=3 connect
by prior salary>salary;


Related Tutorials/Questions & Answers:
oracle   sir now am doing one project , my frond end is vb and backend is oracle. so 1> how can i store the image in my field 2> how can i back up the table into .txt file
Oracle - JDBC
Oracle fetch variables  i wanted to fetch variables from database using Oracle
oracle 18/04/2013
oracle 18/04/2013   Why it is called as structured query language
Oracle - SQL
Oracle  Oracle Begginers , if Downloadable Notes are there Please mention the site
Oracle BLOB
Oracle BLOB  Can anyone send me the code for inserting an image or audio into the oracle database using BLOB datatype.'s useful for my project
oracle conditions
oracle conditions  can you briefly explain about the "EXISTS" condition in SQL with examples
oracle problem
oracle problem  Hi I have installed oracleXE on my system and for reasons i've uninstalled them and am not able to stop oracle xe services and i could'nt reinstall it. I couldnt reinstall my os for this as it is in my office
oracle - JDBC
oracle  sir iam hari iam doing the project using oracle with jdbc in xp when iam inserting the data it is giving error like ora-01034:oracle not available sir plz.......give me the solution it is urgent sir thanku
Oracle - SQL
Oracle  I have one .dmp file. I want to import this file into oracle 9i and oracle 10g. wat is procedure and stepts. thanks u  Open... D:\oracle\ora90\BIN\imp type this command if your are using oracle 9i
oracle connectivity
oracle connectivity  con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr"); i have error on above line when i tried...=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr
oracle - JDBC
to store these two fields into oracle database for that i have given one jsp page... it is giving error like java.sql.SQLException:[MICROSOFT][ODBC Driver for oracle][oracle
oracle - JDBC
oracle  How to collect the backup of tables in oracle? plz,, i want some tables in oracle of one system to be shifted to the another system...;There are two .exe files in ORACLE, with the FOLLOWING names,generally
oracle - SQL
oracle  can you suggest me a book regarding oracle and java even..  Hi friend, For more information on Oracle and Java Books visit to : http
java-oracle  hi friends, I wanted to upload a image from jsp page to oracle database.i am not getting how to do it... Please help me if you can....... please give me detail code
oracle - SQL
oracle  what is meant by redo log file?  Hi Friend, In Oracle, a redo log file is used with each database. It records all changes made in datafiles.Each transactions has been recorded in it.It makes it possible
oracle - JDBC
oracle  HI i am using ORACLE 10g. How to i find "TNSNAMES.ORA" file in my system after installation of ORACLE 10g succussfully. please send... that depends on the actual network implementation used. Oracle recommends that SDU
Oracle - JDBC
Oracle  How to Use Blob and Clob Data types in Oracle...  Hi friend BLOB : Binary Large Object CLOB : Character Large Object Default storage each time a BLOB or CLOB exceeds 4000 bytes you could cause
oracle - SQL
) from employee)); In Oracle, you can use the following query: select max
how to download oracle 9i
how to download oracle 9i  how to download oracle 9i
oracle vs sql
oracle vs sql  what is the difference between oracle and sql
jdk6 and oracle 8i
jdk6 and oracle 8i  I connecte oracle 8i and jdk6 I notice that why can not connect
oracle data backup
oracle data backup  how to take oracle tables data backup and use in another system
File insertion into oracle database
File insertion into oracle database  How to Read and Insert a file (any format) into a Oracle database
storing csv into oracle database
storing csv into oracle database  i want jsp code for storing csv file into oracle database
jsp connection with oracle.
jsp connection with oracle.  I want to connect with jsp to oracle,,,plz send me the codes
jsp connection with oracle.
jsp connection with oracle.  I want to connect with jsp to oracle,,,plz send me the codes
Oracle 9i free download
Oracle 9i free download  where to download oracle 9i for database connectivity in j2ee
Uninstall Oracle Virtual Box
Uninstall Oracle Virtual Box  Hi, Is there any video of uninstalling Oracle Virtual Box? Thanks
Oracle Tutorial
Oracle Tutorial In this section we will discuss about the Oracle Database. This tutorial will describe you about the Oracle Database. This section will describe you the many aspects of Oracle such as, What is Oracle database, Oracle
Hibernate oracle dialect
Hibernate oracle dialect  What is the the Hibernate oracle dialect?   Hi, Here is the Hibernate dialect for oracle database: org.hibernate.dialect.OracleDialect Read more at Dialect in Hibernate. Thanks
Spring and Oracle Database
Spring and Oracle Database  I need example for Batch update process using oracle database and spring framework with full explanation